Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is basically how my blog works, except I use mistune as the markdown renderer, which has allowed me to extend it over time, including adding syntax-highlighted code blocks and latex math syntax: https://www.da.vidbuchanan.co.uk/blog/mathml-blogging.html

I also generate an index page and an RSS feed.

One thing that's been bugging me more recently (now that I have tens of articles written) is that I need to implement incremental rebuilds. Right now every page needs to get regenerated at once, which takes triple-digit-milliseconds. Unacceptable!



Thats an awesome setup and very similar to the one I have. But damn triple-digit-ms does actually sound shockingly slow for what is effectively just heavy text processing. Is there a huge amount of text?


One of my more dubious design decisions (7 years ago...) was to inline all my images as base64 (I was originally planning on having only simple diagrams that would compress well, but this is less true now). I like that every page load generates just a single request, and that you can ctrl+s the page without any breakage.

I haven't profiled anything though, it could also be the syntax highlighting being slow (it generates quite a soup of HTML tags).


A trick I used to use is to check during my custom build step whether the image is under 1k, and inline it if so, otherwise add its hash to the url and add a preload to the html header. I'm trying to get back to that in my latest custom build tool, but it's a gradual process to evolve it to that point properly.


Looks nice and minimal as well. Love the look of your blog!

The markdown2 package includes an option for syntax highlighting. You need to bring your own css though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: