diff --git a/main.py b/main.py index a3d92d1..2ea80cb 100644 --- a/main.py +++ b/main.py @@ -38,7 +38,7 @@ def render_post(fpath): if meta.get('draft'): draft = True - title_out, _ = convert(text) + title_out, _ = convert('# ' + title) out = title_out + out logging.info("writing to %s", destpath) diff --git a/posts/build_a_blog.md b/posts/build_a_blog.md index ed8e807..0ffd78e 100644 --- a/posts/build_a_blog.md +++ b/posts/build_a_blog.md @@ -812,7 +812,7 @@ So here is the diff to make that happen: ```diff diff --git a/main.py b/main.py -index 52ce57b..a3d92d1 100644 +index 52ce57b..2ea80cb 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,11 @@ @@ -860,7 +860,7 @@ index 52ce57b..a3d92d1 100644 draft = True - out = convert('# ' + title) + out -+ title_out, _ = convert(text) ++ title_out, _ = convert('# ' + title) + out = title_out + out logging.info("writing to %s", destpath) @@ -905,9 +905,9 @@ INFO: removing old __bench files INFO: number of *.md files 102 INFO: number of *.html files 2 INFO: running -real 0.45 -user 4.21 -sys 0.32 +real 0.31 +user 2.44 +sys 0.28 INFO: number of *.html files 102 INFO: cleanup __bench files @@ -916,14 +916,14 @@ INFO: removing old __bench files INFO: number of *.md files 1002 INFO: number of *.html files 2 INFO: running -real 2.52 -user 35.69 -sys 0.96 +real 1.34 +user 18.09 +sys 0.47 INFO: number of *.html files 1002 INFO: cleanup __bench files ``` -So that's down to 2.5s for 1000 posts. Not a bad start! +So that's down to ~1.5s for 1000 posts. Not a bad start! [1]: https://crystal-lang.org/ [2]: https://github.com/crystal-lang/crystal/releases/tag/0.31.0