masasam / emacs-easy-hugo

Emacs major mode for managing hugo
https://gohugo.io/tools/editors/#emacs
GNU General Public License v3.0
362 stars 26 forks source link

org-header not used when executing easy-hugo-newpost #33

Closed nickanderson closed 6 years ago

nickanderson commented 6 years ago

I am running in spacemacs and it seems to really break easy-hugo so I am not using that main menu yet.

I am running hugo 0.31 and I use .org as the default file extension. easy-hugo-newpost does initialize a new post but it does not use the org header.

masasam commented 6 years ago

Hi @nickanderson . Have you this file?

archetypes/default.org +++ categories = [""] tags = [""] title = "{{ replace .TranslationBaseName "-" " " | title }}" date = "{{ .Date }}" draft = false +++

https://github.com/masasam/PPAP/blob/master/archetypes/default.org

nickanderson commented 6 years ago

No, I do not. I interpreted the elisp that it would inject the org style header. However, creating the file with org syntax does result in the desired behaviour.

#+Title: "{{ replace .TranslationBaseName "-" " " | title }}"
#+DATE: "{{ .Date }}" 
#+TAGS: [""]
#+DRAFT: false
nickanderson commented 6 years ago

Thanks!

masasam commented 6 years ago

Hi @nickanderson . You can use with the following settings at https://github.com/masasam/emacs-easy-hugo/commit/25e4f9dae0d744e1ee23c7a45292ba1d38137917 (setq easy-hugo-org-header t)

nickanderson commented 6 years ago

Ah, great thanks!