diff --git a/doc/ox-hugo-manual.org b/doc/ox-hugo-manual.org index ba4b685..78b2aa4 100644 --- a/doc/ox-hugo-manual.org +++ b/doc/ox-hugo-manual.org @@ -841,51 +841,54 @@ subtree* i.e. an Org subtree that has the =EXPORT_FILE_NAME= property set. #+caption: Hugo front-matter translation for subtree-based exports #+attr_html: :class sane-table -|------------------------------------+----------------------------------------+----------------------------------------------------------------------------| -| Hugo front-matter (TOML) | Org | Org description | -|------------------------------------+----------------------------------------+----------------------------------------------------------------------------| -| =title = "foo"= | =* foo= | Subtree heading | -| =date = 2017-09-11T14:32:00-04:00= | =CLOSED: [2017-09-11 Mon 14:32]= | Auto-inserted =CLOSED= subtree property when switch to Org *DONE* state | -| =date = 2017-07-24= | =:EXPORT_DATE: 2017-07-24= | Subtree property | -| =publishDate = 2018-01-26= | =SCHEDULED: <2018-01-26 Fri>= | Auto-inserted =SCHEDULED= subtree property using default =C-c C-s= binding | -| =publishDate = 2018-01-26= | =:EXPORT_HUGO_PUBLISHDATE: 2018-01-26:= | Subtree property | -| =expiryDate = 2999-01-01= | =DEADLINE: <2999-01-01 Tue>= | Auto-inserted =DEADLINE= subtree property using default =C-c C-d= binding | -| =expiryDate = 2999-01-01= | =:EXPORT_HUGO_EXPIRYDATE: 2999-01-01:= | Subtree property | -| =lastmod = = | =:EXPORT_HUGO_AUTO_SET_LASTMOD: t= | Subtree property | -| =lastmod = = | =#+hugo_auto_set_lastmod: t= | Org keyword | -| =tags = ["toto", "zulu"]= | =* foo :toto:zulu:= | Subtree heading tags | -| =categories = ["x", "y"]= | =* foo :@x:@y:= | Subtree heading tags with =@= prefix | -| =draft = true= | =* TODO foo= | Subtree heading Org Todo state set to =TODO= (or =DRAFT=) | -| =draft = false= | =* foo= | Subtree heading Org Todo state *not* set to =TODO= (or =DRAFT=) | -| =weight = 123= (manual) | =:EXPORT_HUGO_WEIGHT: 123= | Manual setting of page weight | -| =weight = 123= (auto-calc) | =:EXPORT_HUGO_WEIGHT: auto= | When set to =auto=, page weight is auto-calculated | -| =tags_weight = 123= (manual) | =:EXPORT_HUGO_WEIGHT: :tags 123= | Manual setting of /FOO/ taxonomy weight, by setting to =:FOO VALUE= | -| =tags_weight = 123= (auto-calc) | =:EXPORT_HUGO_WEIGHT: :tags auto= | When set to =:FOO auto=, /FOO/ taxonomy weight is auto-calculated | -| =weight = 123= (in =[menu.foo]=) | =:EXPORT_HUGO_MENU: :menu foo= | Menu weight is auto-calculated unless specified | -|------------------------------------+----------------------------------------+----------------------------------------------------------------------------| +|------------------------------------+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------| +| Hugo front-matter (TOML) | Org | Org description | +|------------------------------------+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------| +| =title = "foo"= | =* foo= | Subtree heading | +| =date = 2017-09-11T14:32:00-04:00= | =CLOSED: [2017-09-11 Mon 14:32]= | Auto-inserted =CLOSED= subtree property when switch to Org *DONE* state | +| =date = 2017-07-24= | =:EXPORT_DATE: 2017-07-24= | Subtree property | +| =publishDate = 2018-01-26= | =SCHEDULED: <2018-01-26 Fri>= | Auto-inserted =SCHEDULED= subtree property using default =C-c C-s= binding | +| =publishDate = 2018-01-26= | =:EXPORT_HUGO_PUBLISHDATE: 2018-01-26:= | Subtree property | +| =expiryDate = 2999-01-01= | =DEADLINE: <2999-01-01 Tue>= | Auto-inserted =DEADLINE= subtree property using default =C-c C-d= binding | +| =expiryDate = 2999-01-01= | =:EXPORT_HUGO_EXPIRYDATE: 2999-01-01:= | Subtree property | +| =lastmod = = | =:EXPORT_HUGO_AUTO_SET_LASTMOD: t= | Subtree property | +| =lastmod = = | =#+hugo_auto_set_lastmod: t= | Org keyword | +| =tags = ["toto", "zulu"]= | =* foo :toto:zulu:= | Subtree heading tags | +| =categories = ["x", "y"]= | =* foo :@x:@y:= | Subtree heading tags with =@= prefix | +| =draft = true= | =* TODO foo= | Subtree heading Org TODO state set to =TODO= (or =DRAFT=). See ~org-hugo-todo-keywords~ and ~org-hugo-default-draft-state~. | +| =draft = false= | =* DONE foo= | Subtree heading Org TODO state set to =DONE=. See ~org-hugo-todo-keywords~ and ~org-hugo-default-draft-state~. | +| =weight = 123= (manual) | =:EXPORT_HUGO_WEIGHT: 123= | Manual setting of page weight | +| =weight = 123= (auto-calc) | =:EXPORT_HUGO_WEIGHT: auto= | When set to =auto=, page weight is auto-calculated | +| =tags_weight = 123= (manual) | =:EXPORT_HUGO_WEIGHT: :tags 123= | Manual setting of /FOO/ taxonomy weight, by setting to =:FOO VALUE= | +| =tags_weight = 123= (auto-calc) | =:EXPORT_HUGO_WEIGHT: :tags auto= | When set to =:FOO auto=, /FOO/ taxonomy weight is auto-calculated | +| =weight = 123= (in =[menu.foo]=) | =:EXPORT_HUGO_MENU: :menu foo= | Menu weight is auto-calculated unless specified | +|------------------------------------+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------| ***** Notes -- Precedence for =date= parsing: =CLOSED= subtree property /more than/ - =EXPORT_DATE= subtree property /more than/ =#+date:= keyword. +- Precedence for =date= parsing :: =CLOSED= subtree property /more + than/ =EXPORT_DATE= subtree property /more than/ =#+date:= + keyword. +- Precedence for =draft= parsing :: Org TODO state based /draft/ state + /more than/ =EXPORT_HUGO_DRAFT= subtree property. **** For file-based exports #+caption: Hugo front-matter translation for file-based exports #+attr_html: :class sane-table -|----------------------------------+--------------------------------------| -| Hugo front-matter (TOML) | Org | -|----------------------------------+--------------------------------------| -| =title = "foo"= | =#+title: foo= | -| =date = 2017-07-24= | =#+date: 2017-07-24= | -| =publishDate = 2018-01-26= | =#+hugo_publishdate: 2018-01-26= | -| =expiryDate = 2999-01-01= | =#+hugo_expirydate: 2999-01-01= | -| =lastmod = = | =#+hugo_auto_set_lastmod: t= | -| =tags = ["toto", "zulu"]= | =#+hugo_tags: toto zulu= | -| =categories = ["x", "y"]= | =#+hugo_categories: x y= | -| =draft = true= | =#+hugo_draft: true= | -| =draft = false= | =#+hugo_draft: false= (default) | -| =weight = 123= | =#+hugo_weight: 123= | -| =tags_weight = 123= | =#+hugo_weight: :tags 123= | -| =categories_weight = 123= | =#+hugo_weight: :categories 123= | -| =weight = 123= (in =[menu.foo]=) | =#+hugo_menu: :menu foo :weight 123= | -|----------------------------------+--------------------------------------| +|----------------------------------+-------------------------------------------------------------| +| Hugo front-matter (TOML) | Org | +|----------------------------------+-------------------------------------------------------------| +| =title = "foo"= | =#+title: foo= | +| =date = 2017-07-24= | =#+date: 2017-07-24= | +| =publishDate = 2018-01-26= | =#+hugo_publishdate: 2018-01-26= | +| =expiryDate = 2999-01-01= | =#+hugo_expirydate: 2999-01-01= | +| =lastmod = = | =#+hugo_auto_set_lastmod: t= | +| =tags = ["toto", "zulu"]= | =#+hugo_tags: toto zulu= | +| =categories = ["x", "y"]= | =#+hugo_categories: x y= | +| =draft = true= | =#+hugo_draft: true= | +| =draft = false= | =#+hugo_draft: false= (See ~org-hugo-default-draft-state~.) | +| =weight = 123= | =#+hugo_weight: 123= | +| =tags_weight = 123= | =#+hugo_weight: :tags 123= | +| =categories_weight = 123= | =#+hugo_weight: :categories 123= | +| =weight = 123= (in =[menu.foo]=) | =#+hugo_menu: :menu foo :weight 123= | +|----------------------------------+-------------------------------------------------------------| ***** Notes - The *auto calculation* of weights for pages, taxonomies and menu items works *only* for subtree-based exports. diff --git a/ox-hugo.el b/ox-hugo.el index 33fd087..cddbe49 100644 --- a/ox-hugo.el +++ b/ox-hugo.el @@ -453,7 +453,18 @@ that for the `draft' keywords, a message like \"[ox-hugo] post is marked as a DRAFT\" is displayed in the echo area. If the Org TODO keyword matches any of the keywords associated -with `done', the Hugo draft state is set to false." +with `done', the Hugo draft state is set to false. + +The default value of this variable works with the default set of +Org TODO keywords (just that the `draft' state will not exist in +that case). If the `draft' state is desired, add this setting to +your Org file: + + #+seq_todo: TODO DRAFT DONE + +If this variable's value is changed, it is the user's +responsibility to update \"#+seq_todo\" accordingly. See (org) +Per-file keywords for more." :group 'org-export-hugo :type '(list cons cons cons))