Skip to content

Blog posts for my personal blog.

Notifications You must be signed in to change notification settings

jakub-stastny/data.blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

My blog posts written in the Org mode format. I export them using my ox-org-in-json exporter for Emacs and then consume them in JSON on my blog engine Elm frontend.

Rationale

I use Org mode for all my writting, hence it only makes sense to use it for my blog as well.

Org mode already supports metadata, which allows for defining tags, draft status and the like.

Format

Each blog post has its own directory YY-MM-DD-slug. The main file will be simply named slug.org, where slug matches the slug used in the directory name. The .profile.zsh file has mkpost function to automate that, just call it with the slug and it will create the directory structure for you.

Any optional assets will be in the assets subdirectory.

Output

The output is a bunch of JSON files, which are easy for the frontend to consume. Wherever formatting is required, the Org mode format is used on the export side as well.

Tasks

Org mode export plugin

There is already ox-json, but it exports a list of nodes. I want to export metadata and content, where the content is in the Org mode format.

Frontend Org format parser

org-js looks promising, I should be able to integrate it using custom elements on the Elm side. In the worst case I can write my own library using PEG.js. There is no PEG in the Elm landscape as far as I know, so that’d probably be the best option.