Skip to content

Commit

Permalink
fix(docgen): inline esupports.metagen template function definitions (
Browse files Browse the repository at this point in the history
  • Loading branch information
jneidel committed Jul 7, 2023
1 parent 36dd4ba commit a993b35
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,40 @@ module.config.public = {
-- The title field generates a title for the file based on the filename.
{
"title",
function()
return vim.fn.expand("%:p:t:r")
end,
function() return vim.fn.expand("%:p:t:r") end,
},
-- The description field is always kept empty for the user to fill in.
{ "description", "" },
-- The authors field is autopopulated by querying the current user's system username.
{ "authors", require("neorg.external.helpers").get_username },
{
"authors",
function() return require("neorg.external.helpers").get_username() end,
},
-- The categories field is always kept empty for the user to fill in.
{ "categories", "" },
-- The created field is populated with the current date as returned by `os.date`.
{
"created",
function()
return os.date("%Y-%m-%d")
end,
function() return os.date("%Y-%m-%d") end,
},
-- When creating fresh, new metadata, the updated field is populated the same way
-- as the `created` date.
{
"updated",
function()
return os.date("%Y-%m-%d")
end,
function() return os.date("%Y-%m-%d") end,
},
-- The version field determines which Norg version was used when
-- the file was created.
{ "version", require("neorg.config").norg_version },
{
"version",
function() return require("neorg.config").norg_version end
},
},
}
Expand Down

0 comments on commit a993b35

Please sign in to comment.