Add inherited tags to the front matter too #awesome

master
Kaushal Modi 9 years ago
parent ae757b843d
commit d895958fc8
  1. 11
      example-site/content-org/all-posts.org
  2. 8
      example-site/content/posts/emacs-post-1.md
  3. 8
      example-site/content/posts/emacs-post-2.md
  4. 4
      ox-hugo.el

@ -130,6 +130,17 @@ This post must not be exported as it is commented.
:PROPERTIES:
:EXPORT_FILE_NAME: test-tags
:END:
* Section :emacs:
** Emacs Post 1 :foo:
:PROPERTIES:
:EXPORT_FILE_NAME: emacs-post-1
:END:
Here is the first post on Emacs.
** Emacs Post 2 :bar:
:PROPERTIES:
:EXPORT_FILE_NAME: emacs-post-2
:END:
Here is the second post on Emacs.
* TODO Pre-Draft State
:PROPERTIES:
:EXPORT_FILE_NAME: draft-state-todo

@ -0,0 +1,8 @@
+++
title = "Emacs Post 1"
date = 2017-07-12T17:31:56-04:00
tags = ["emacs", "foo"]
draft = false
+++
Here is the first post on Emacs.

@ -0,0 +1,8 @@
+++
title = "Emacs Post 2"
date = 2017-07-12T17:31:56-04:00
tags = ["emacs", "bar"]
draft = false
+++
Here is the second post on Emacs.

@ -625,7 +625,9 @@ file."
(if entry
(progn
(setq is-commented (org-element-property :commentedp entry))
(setq tags (org-get-tags))
;; (setq tags (org-get-tags)) ;Return a list of tags *only* at the current heading
(setq tags (org-get-tags-at)) ;Return a list of tags at current heading
;+ inherited ones! Needs `org-use-tag-inheritance' to be t.
(dolist (exclude-tag org-export-exclude-tags)
(when (member exclude-tag tags)
(setq is-excluded t)))

Loading…
Cancel
Save