You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
9 years ago | |
|---|---|---|
| README.org | 9 years ago | |
| ox-blackfriday.el | 9 years ago | |
| ox-hugo-helper.el | 9 years ago | |
README.org
!! Package not yet meant for general public consumption !!
This package will be an org exporter backend that exports org-mode to markdown with hugo">hugo -required TOML front-matter. hugo also supports YAML front-matter but planning to stick with TOML for now.
What this package is planned to do –
- Write blog posts and other content in
org-mode. -
For current subtree
- Export the org-mode meta-data and content into a separate markdown file.
- Do that with each save.
At present this project consists of the following files:
ox-blackfriday.el: a derived backend that exports to the blackfriday markdown syntax, which Hugo uses as a basisox-hugo-helper.el: collection of legacy functions gleaned from the web
This package might evolve into a multi-.el project.
- An
ox-hugo.elthat just deals with exporting org to md. -
A
hugo.elwith helper elisp snippets to do stuff like:- New post creation using
org-capture. - Single interactive function to export only the current subtree.
- Interactive function to toggle draft state, add/remove/increment/decrement publishdate property.
- Set separate faces for titles based on draft state and futureness.
- Option to use template
config.tomland some default hugo theme. So all a new user would need to do is to (i) have thehugobinary inPATH(ii) define theirhugoblog dir in thedefcustom(iii)M-x hugo.
- New post creation using
TODO
[0/12]
- Have
ox-hugobe a backend derived fromox-blackfriday(ox-blackfridayneeded at least for table support). - fix table horizontal rule generator, which currently adds an additional syntax-breaking space in each cell
- Parse org tags to set the hugo post tags/categories in fm.
- Parse org heading to set the hugo post title in fm.
- Use title to auto-generate file name string.
- Set post date to be the same as the export date unless
:PUBLISHDATE:property exists. - Ability to set/toggle
:DRAFT: truein property drawer. Of course that should translate to hugo post fm. - Function to re-export the whole org file to subtree-specific markdown files
- Use
org-captureto generate new posts in a pre-defined "blog posts org file". That step should also auto-insert the meta-data needed for hugo frontmatter as needed – like the post's initial draft state. - Different faces for the post heading based on its draft state and futureness (if publishdate is newer than today).
- Call
hugoafter each save.
References
Currently the ox-hugo.el just contains slightly re-factored code snippets from the below 2 sources:
- http://www.holgerschurig.de/en/emacs-blog-from-org-to-hugo/
- http://whyarethingsthewaytheyare.com/setting-up-the-blog/
Recently discovered https://github.com/helloyi/ox-hugo.