#+title: My Blog #+author: #+hugo_base_dir: ../ #+tags: these tags do not get globally applied to the posts #+filetags: alpha beta #+filetags: hyphened-tag #+filetags: tag__with__lot__of__words # Categories #+filetags: @cat1 # All tags in above #+filetags lines will get collected. # 1. Load `ox-hugo' # 2. C-c C-e H A * Super heading :super: ** Inheriting tags :gamma:delta:two__words:@cat2: :PROPERTIES: :EXPORT_FILE_NAME: inheriting-tags :END: If user specifies tags to the post subtree heading, those tags get added to the set of default tags set in =#+filetags= (and the ones inherited). For the inheritance of tags from parent headings and =#+filetags= to work, =org-use-tag-inheritance= needs to be set appropriately if changed from the default value of =t=. These tags are collected together and assigned to the Hugo =tags= front matter variable for this post. When setting categories via Org-style tags, prefix the tags with "@". That "@" is used as a special character for =ox-hugo= to identify those tags to be used as Hugo categories. This applies to categories added as Org tags to headings as well as =#+filetags=. ** Overriding Org-style tags :this_tag_wont_apply:@this_cat_wont_apply: :PROPERTIES: :EXPORT_HUGO_TAGS: overriding :EXPORT_HUGO_TAGS+: underscore_is_retained hyphenated-works :EXPORT_HUGO_CATEGORIES: cat3 "3 word cat" :EXPORT_FILE_NAME: overriding-tags :END: By using =EXPORT_HUGO_TAGS= in the property drawer, Org tags in the current heading ("this_tag_wont_apply") *and* the inherited one ("alpha", "beta", "hyphenated-tag", "super") will get overridden. When setting categories via the keyword =#+hugo_categories= or the subtree property =EXPORT_HUGO_CATEGORIES=, do *not* add the "@" prefix.