I write all my posts in emacs org-mode. I keep everything in a single
blog.org file and each subtree is a post.
When I am finished writing an article I export the single subtree to markdown, add some markup and manually upload it to GitHub. It then gets nicely rendered by jekyll.
GitHub pages runs jekyll and jekyll expectes the following folder structure for a webiste to be published.
. ├── _config.yml ├── _drafts | ├── begin-with-the-crazy-ideas.md | └── on-simplicity-in-technology.md ├── _includes | ├── footer.html | └── header.html ├── _layouts | ├── default.html | └── post.html ├── _posts | ├── 2007-10-29-why-every-programmer-should-play-nethack.md | └── 2009-04-26-barcamp-boston-4-roundup.md ├── _data | └── members.yml ├── _site ├── .jekyll-metadata └── index.html
The files in the
_posts folder must follow a naming rule:
And the single *.md files must contain the following informations at the beginning:
--- layout: layoutname title: post title ---
So, when I am done writing I add the following before exporting the single subtree:
* How I write this blog :PROPERTIES: :EXPORT_FILE_NAME: 2016-11-15-howiwrite :EXPORT_TITLE: 2016-11-15-howiwrite :END: #+BEGIN_HTML --- layout: post title: How I write this blog --- #+END_HTML I write all my posts in emacs org-mode. I keep eve...
That’s it. I could of course automate the uploading thing but I like this pipeline: it allows you to control everything and it is not so time consuming.