▲ | wraptile 2 days ago | |
I recently wrote my own very similar static site generator in Python to migrate away from Ghost CMS and Python today has everything you need: - pathlib is brilliant for managing filesystem - jinja2 still best templating engine out there - mistune very good markdown -> html renderer and it's quite easy to extend - lxml is quite fast when it comes to HTML modification for dynamic content injection (CTAs etc.) - livereload is great for live development and you can get around Python's slowness with smart reloading rather than having to rebuild the entire site - tailwindcss works brilliantly with static generators as dropping in some html in markdown makes content creation really flexible Making your own generator has never been this easy! My only gripe is having to tune livereload to avoid rebuilding everything with each modification as building all 400+ articles on Python currently takes around 4 seconds which when doing theme development is a bit annoying but a small price to pay for staying in the Python ecosystem. For content creation you can just rebuild the effected graph of objects which is just some miliseconds, even in Python. |