diff --git a/Shakefile.hs b/Shakefile.hs index ac446a9..a6600e7 100644 --- a/Shakefile.hs +++ b/Shakefile.hs @@ -107,12 +107,11 @@ genAllDeps patterns = do buildRules :: Rules () buildRules = do cleanRule - -- build "//*" %> copy allRule getPost <- mkGetPost getPosts <- mkGetPosts getPost getTemplate <- mkGetTemplate - build "//*" %> \out -> do + build "**" %> \out -> do let asset = dropDirectory1 out case (takeExtension asset) of ".html" -> do @@ -231,13 +230,13 @@ genAsciiAction getPost out = do allHtmlAction :: Action () allHtmlAction = do - allOrgFiles <- getDirectoryFiles srcDir ["//*.org"] + allOrgFiles <- getDirectoryFiles srcDir ["**.org"] let allHtmlFiles = map (-<.> "html") allOrgFiles need (map build allHtmlFiles) allAsciiAction :: Action () allAsciiAction = do - allOrgFiles <- getDirectoryFiles srcDir ["//*.org"] + allOrgFiles <- getDirectoryFiles srcDir ["**.org"] let allAsciiFiles = map (-<.> "txt") allOrgFiles need (map build allAsciiFiles) @@ -263,7 +262,7 @@ compressImage img = do allRule :: Rules () allRule = phony "all" $ do - allAssets <- filter (/= ".DS_Store") <$> getDirectoryFiles srcDir ["//*.*"] + allAssets <- filter (/= ".DS_Store") <$> getDirectoryFiles srcDir ["**"] need (map build $ allAssets <> ["archive.html"]) allHtmlAction allAsciiAction @@ -272,7 +271,7 @@ cleanRule :: Rules () cleanRule = phony "clean" $ do putInfo "Cleaning files in _site and _optim" - forM_ [siteDir,optimDir] $ flip removeFilesAfter ["//*"] + forM_ [siteDir,optimDir] $ flip removeFilesAfter ["**"] mkGetTemplate :: Rules (FilePath -> Action Template) mkGetTemplate = newCache $ \path -> do @@ -302,4 +301,4 @@ mkGetPost = newCache $ \path -> do mkGetPosts :: (FilePath -> Action b) -> Rules (() -> Action [b]) mkGetPosts getPost = - newCache $ \() -> mapM getPost =<< getDirectoryFiles "" ["src/posts//*.org"] + newCache $ \() -> mapM getPost =<< getDirectoryFiles "" ["src/posts/**.org"] diff --git a/shell.nix b/shell.nix index d7827e6..bff21dd 100644 --- a/shell.nix +++ b/shell.nix @@ -26,5 +26,7 @@ pkgs.mkShell { git direnv haskellPackages.shake + # for emacs dev + ripgrep ]; } diff --git a/src/demo.org b/src/demo.org index 91145e1..131689a 100644 --- a/src/demo.org +++ b/src/demo.org @@ -344,9 +344,9 @@ After the rule. an image: +#+ATTR_HTML: The Experiment #+CAPTION: Testing include an image #+NAME: fig:test-image -#+ATTR_HTML: The Experiment [[../img/a.png]] diff --git a/src/posts/0013-how-to-choose-your-tools/index.org b/src/posts/0013-how-to-choose-your-tools/index.org index 6aa6279..9e116d2 100644 --- a/src/posts/0013-how-to-choose-your-tools/index.org +++ b/src/posts/0013-how-to-choose-your-tools/index.org @@ -19,8 +19,8 @@ And this week-end, in the morning I read those: - [[https://news.ycombinator.com/item?id=23107123][Making Emacs popular again]] - [[https://news.ycombinator.com/item?id=23092904][Github Codespace]] -#+DOWNLOADED: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.g7OSuCGH0u7OIUA9vdxlTAEsCo%26pid%3DApi&f=1 @ 2020-05-09 12:49:34 #+ATTR_HTML: :alt Midsommar Welcome +#+DOWNLOADED: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.g7OSuCGH0u7OIUA9vdxlTAEsCo%26pid%3DApi&f=1 @ 2020-05-09 12:49:34 [[file:2020-05-09_12-49-34_.jpeg]] @@ -93,8 +93,8 @@ For the single developers and open source developers this offer: But the price to pay is hidden. -#+DOWNLOADED: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.FrCRrhENMjdfD4pUcAwKEgHaEK%26pid%3DApi&f=1 @ 2020-05-09 12:48:31 #+ATTR_HTML: :alt Midsommar Cry +#+DOWNLOADED: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.FrCRrhENMjdfD4pUcAwKEgHaEK%26pid%3DApi&f=1 @ 2020-05-09 12:48:31 [[file:2020-05-09_12-48-31_.jpeg]]