diff --git a/BACKLOG.org b/BACKLOG.org index 68ba0feec..8fbede695 100644 --- a/BACKLOG.org +++ b/BACKLOG.org @@ -1,4 +1,5 @@ * BACKLOG.org +#+OPTIONS: H:2 An efficient public store of tasks/changes/design notes, mostly from SM's private backlog; things that I/we feel would be nice to have, or diff --git a/Shake.hs b/Shake.hs index 7da9a045e..7a2e9bd2f 100755 --- a/Shake.hs +++ b/Shake.hs @@ -768,14 +768,40 @@ main = do ] |%> \out -> do let src = drop 1 out -<.> "org" need [src] - liftIO $ writeFile out $ unlines [ + -- replace the generated top heading with our own so we can insert the TOC after it + let heading = dropExtension $ drop 1 out + mdlines <- drop 1 . lines . fromStdout <$> (cmd Shell pandoc fromorg towebmd src :: Action (Stdout String)) + liftIO $ writeFile out $ unlines $ [ "" + ,"" + ,"# " ++ heading + ,"" ,"