handle variable-length front matter

This commit is contained in:
2026-03-04 10:56:18 +01:00
parent 320bc0b6c0
commit 5df2b79938
3 changed files with 121 additions and 31 deletions

View File

@@ -299,15 +299,15 @@ libdenote#scheme_metadata({filename})
*libdenote-frontmatter*
Front-matter functions~
*libdenote#fm_gen()*
libdenote#fm_gen({ext}, {id}, {title}, {tags}, {md_type})
libdenote#fm_gen({ext}, {id}, {title}, {tags}, {mdtype})
This function returns the list of lines for the front matter that
stores the given metadata. The paramter {ext} is the extension of the
file, the parameter {id} the identifier, the parameter {title}, the
title of the note, and {tags} the optional parameter as a list of tags
associated to the note. Per default {tags} is set to the empty list
[]. Finally, {md_type} descries the format to be used in markdown. For
markdown files (extension 'md'), two formats are possible: 'yaml' and
'toml'. The former format is used per default.
associated to the note. The argument {mdtype} descries the format to
be used in markdown. For markdown files (extension 'md'), two formats
are possible: 'yaml' and 'toml'. The former format is used per
default.
*libdenote#fm_alter()*
libdenote#fm_alter({fm}, {mod})
@@ -321,11 +321,6 @@ libdenote#fm_alter({fm}, {mod})
and "tags" are used to update the title and tag list of the front
matter.
*libdenote#fm_len()*
libdenote#fm_len({ext})
This returns the number of lines of the front matter for files with
the extension {ext}.
==============================================================================
APPENDIX B - PACKAGE API *denote-api*