Closed jenschlot closed 3 years ago
If this is doable, or some other alternative similar to this, could you point me in the direction in where to make the changes? I could look into working on this.
@gptt916 The topic object is created in tocJSONadapter.js#createTopic(). It doesn't look like it has the properties handy currently, so they would need to be passed along the chain of callers if possible.
Invocations of the json.toc.onTopic
extension now include a data.frontMatterMap
attribute, which enables implementors of this extension to update generated topics according to the document's front matter. For an example of doing this with a lastupdated
attribute see the example/jsonTocExt.js file change in commit https://github.com/IBM/marked-it-cli/commit/d8614e628e5b10ce29a4247167a802c291dca669.
Closing Issue.
Can we add an extension or configuration to pull in any "property" from the YAML definition at the top of the MD file, and print it as a property in the toc for that entry...?
An example would be to pull the lastupdated value in the MD files YAML definiton:
And, print as a property in the toc.json, something like: