31 ms·
* Makefile * Pandoc * git You push to a remote on your server, it runs the Makefile via post-receive hook and builds a single, static html file from your Markd
by turbinerneiter 9y ago
* Makefile
* Pandoc
* git
You push to a remote on your server, it runs the Makefile via post-receive hook and builds a single, static html file from your Markdown with Pandoc (inlineing everything, images even fonts if you want to) and copies it to the folder served by your nginx.
- err4nt 9y agoHey! This really piqued my interest, could you explain more about the makefile part of this? I currently use Pandoc to convert a folder of .MD files into .HTML files with the same name, and have begun modifying the templates and making use of the YAML metadata you can add. I really like working with markdown like this, and it's perfect for Git. Here's an example of the kind of build script I use currently: https://github.com/tomhodgins/responsive.style/blob/master/src/build-prod.sh https://github.com/tomhodgins/responsive.style/blob/master/s... How would you build the contents of the /src folder with pandoc and your makefile? Edit: for those looking for an example of the result of one of my Markdown -> Pandoc -> Git -> Static Hosting workflows, check out this page: - Static HTML: https://responsive.style/techniques/child-element https://responsive.style/techniques/child-element - Markdown Source: https://raw.githubusercontent.com/tomhodgins/responsive.style/master/src/techniques/child-element.md https://raw.githubusercontent.com/tomhodgins/responsive.styl...
- flukus 9y agoHere is a post I made (and generated) about my generator: http://flukus.github.io/building-a-blog-engine.html http://flukus.github.io/building-a-blog-engine.html It's pretty similar to your shell script but builds are incremental with no extra work. I went with awk for index generation and metadata. There's still plenty of room for improvement but it does most of what I want.
- artemis73 9y agoInteresting proposition. This could be a worthwhile weekend project. Will use Hugo for now as I don't intend to get my own VPS anytime soon but I'll definitely try this out. Thank you!