Author

The author front-matter parameter is designed to always be a list or an array, so that multiple authors can be supported.

Default Author #

The author parameter is set to always export by default (as the default value of org-export-with-author is t).

The author name defaults to user-full-name. You can choose to either customize this variable in your Emacs config, or manually set the author name by adding the below to the top of your Org file:

#+author: FirstName LastName

If using per-subtree flow, and if you want to specify the author (or override the value set by the above #+author keyword) differently for all posts under a subtree, add below in that subtree’s property drawer:

:PROPERTIES:
:EXPORT_AUTHOR: Firstname LastName
:END:

Either of above two author-setting methods will export to this TOML front-matter:

author = ["FirstName LastName"]

Multiple Authors #

Multiple authors can be specified by either:

  • Using multiple #+author keywords, or

    #+author: FAuthor1 LAuthor1
    #+author: FAuthor2 LAuthor2
  • Specifying comma-separated authors, if setting them in subtree properties.

    :PROPERTIES:
    :EXPORT_AUTHOR: FAuthor1 LAuthor1, FAuthor2 LAuthor2
    :END:

Either of above two author-setting methods will export to this TOML front-matter:

author = ["FAuthor1 LAuthor1", "FAuthor2 LAuthor2"]

Disabling exporting of author parameter #

Author exporting can be disabled using any of these ways:

  • To disable author exporting only for a specific Org file, add below to the top of that file:

    #+options: author:nil
  • If using per-subtree flow, and if you want to disable author exporting only for posts under specific subtrees, add below in the property drawers of those:

    :PROPERTIES:
    :EXPORT_OPTIONS: author:nil
    :END:
  • To disable author exporting by default for all exporters (not just ox-hugo), set org-export-with-author to nil in your Emacs config.

Tweaking your Hugo template to support list author #

The author front-matter parameter is always exported as a TOML/YAML list.

If you already have Hugo posts with the author front-matter already set, it is possible that those values exist as single string values instead of lists.

If so, you can use a snippet like the author.html partial used by this doc site to parse the author parameter correctly (whether it’s a plain string or a list of strings).

Forcing author to be a string (alternative) #

If you are not comfortable with Hugo templates, you can alternatively force the author param to be a plain string instead of a list, by setting it as a custom front-matter parameter:

#+author:
#+hugo_custom_front_matter: :author "FirstName LastName"
Note
Remember to set the default author name to nil if doing this, by setting the #+author keyword (or :EXPORT_AUTHOR: property) to nothing.
Fork me on GitHub