I added a .gitignore to ignore doc/content, doc/public and
ox-hugo-autoloads.el. I also added ox-hugo-autoloads.el to the make
clean rule so that it is removed.
This defcustom defaults to nil to retain the old behavior.
Set this to t (in your config or .dir-locals.el) to prepend link
descriptions for tables, source blocks and figures with "Table", "Code
Snippet" and "Figure".
Fixes https://github.com/kaushalmodi/ox-hugo/issues/233.
.. where NAME is the "#+name" as set in the Org source for that Org
element.
Earlier the anchors contained the code/table/figure ordinal instead
which would result is very non-permanent links.
Fixes https://github.com/kaushalmodi/ox-hugo/issues/234.
Fixes https://github.com/kaushalmodi/ox-hugo/issues/215.
Example:
#+hugo_base_dir: .
#+hugo_section: posts
* emacs section :@emacs:
:PROPERTIES:
:EXPORT_HUGO_SECTION*: emacs
:END:
** Post in emacs
:PROPERTIES:
:EXPORT_FILE_NAME: a-post-related-to-emacs
:END:
Post created in ~posts/emacs~.
** emacs/org section :org:
:PROPERTIES:
:EXPORT_HUGO_SECTION*: org
:END:
*** Post in emacs/org
:PROPERTIES:
:EXPORT_FILE_NAME: a-post-related-to-emacs-and-org
:END:
Post created in ~posts/emacs/org~.
*** emacs/org/elisp section :elisp:
:PROPERTIES:
:EXPORT_HUGO_SECTION*: elisp
:END:
**** Post in emacs/org/elisp
:PROPERTIES:
:EXPORT_FILE_NAME: a-post-related-to-emacs-and-org-and-elisp
:END:
Post created in ~posts/emacs/org/elisp~.
Add `org-hugo--allow-auto-export-after-capture` at the end of the
`org-capture-after-finalize-hook` hook, not at the beginning, because
it is possible that the `save-buffer` is called directly or indirectly
earlier in that same hook.
Ref: https://github.com/kaushalmodi/ox-hugo/issues/212
- Fixes https://github.com/kaushalmodi/ox-hugo/issues/206.
- Move org-hugo--get-reference from ox-hugo.el to
org-blackfriday--get-reference in ox-blackfriday.el.
- Minor code cleanup; remove commented out calls to
org-export-get-reference.