Skip to content

Commit

Permalink
docs: Add template example to metagen docs (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
bottd authored Aug 18, 2024
1 parent 38f9042 commit 85f15f0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ module.config.public = {
delimiter = ": ",

-- Custom template to use for generating content inside `@document.meta` tag
-- The template is a list of lists, each defining a key-value pair of metadata
--
-- Example:
-- ```
-- template = {
-- -- Default field name without a value will fall back to the default behavior
-- { "title" },
-- -- Set a custom value for "authors" field
-- { "authors", "Vhyrro" },
-- -- Fields can be set by lua functions
-- {
-- "categories",
-- function()
-- return {"Category-1", "Category-2"}
-- end
-- }
-- }
-- ```
template = default_template,

-- Custom author name that overrides default value if not nil or empty
Expand Down

0 comments on commit 85f15f0

Please sign in to comment.