Skip to content

Commit

Permalink
Merge pull request #8 from titaniumbones/matt-refactor
Browse files Browse the repository at this point in the history
Matt refactor
  • Loading branch information
kaushalmodi committed Jun 27, 2017
2 parents efcb9c1 + e777653 commit c2b9e2e
Show file tree
Hide file tree
Showing 4 changed files with 809 additions and 156 deletions.
30 changes: 19 additions & 11 deletions README.org
Expand Up @@ -4,11 +4,15 @@ This package will be an org exporter backend that exports =org-mode= to =markdow

What this package is planned to do --

- Write blog posts in =org-mode=.
- 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:


This package might evolve into a multi-.el project.

1. An =ox-hugo.el= that just deals with exporting org to md.
Expand All @@ -19,21 +23,25 @@ This package might evolve into a multi-.el project.
- Set separate faces for titles based on /draft/ state and /futureness/.
- Option to use template =config.toml= and some default hugo theme. So all a new user would need to do is to (i) have the =hugo= binary in =PATH= (ii) define their =hugo= blog dir in the =defcustom= (iii) =M-x hugo=.

* TODO [0/9]
- [ ] Have =ox-hugo= be a backend derived from =ox-gfm= (=ox-gfm= needed at least for table support).
- [ ] 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: true= in property drawer. Of course that should translate to hugo post fm.
* TODO [1/8]
- [X] Have =ox-hugo= be a backend derived from =ox-blackfriday= (=ox-blackfriday= needed at least for table support).
- [ ] fix table horizontal rule generator, which currently adds an additional syntax-breaking space in each cell
- [ ] Parse org heading to set the hugo post title in fm
- [-] Clean up and formalize metadata fields
- [ ] Parse org tags to set the hugo post tags/categories in fm.
- [X] 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: true= in 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-capture= to 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).
- [ ] Different faces for the post heading based on its /draft/ state and /futureness/ (if /publishdate/ is newer than today). (this seems like a `hugo-minor-mode`. Seems cool to do, but maybe a separate project?
- [ ] Call =hugo= after each save.

* References
Currently the =ox-hugo.el= just contains slightly re-factored code snippets from the below 2 sources:
Currently the =ox-hugo-helper.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.
=ox-blackfriday.el= is a derived backend that exports to the blackfriday markdown syntax, which Hugo uses as a basis. Stolen from `ox-gfm.el`

=ox-hugo-helper.el= is a lightly-rewritten version of @helloyi's exporter: https://github.com/helloyi/ox-hugo.

0 comments on commit c2b9e2e

Please sign in to comment.