mdmath
mdmath copied to clipboard
HTML title in md
Is there a way to encode the HTML page's title in the markdown source file?
I think the following code may works with metadata at the beginning like this:
{{{"title":"YOUR TITLE"}}} or ---"title":"YOUR TITLE"---
https://github.com/goessner/mdmath/blob/b562f83cf1f427ea74f80dd90b62e3eeec2cad2c/extension.js#L75-L94
But unfortunately, this code does not clear the metadata from the output. I guess it should be like this at line 79:
markdown = markdown.replace(/^\s*?[{\-]{3}([\s\S]+?)[}\-.]{3}\s*?/g, ($0,$1) => { frontmatter = $1; return '';});