Open ZachEngstrom opened 2 years ago
https://nodejs.org/api/modules.html#__filename:
__filename
The file name of the current module. This is the current module file's absolute path with symlinks resolved.
So yeah of course that would reference your config file.
Anyway, wasn't really aware that the document title is what's used for the title
in the header template. So yeah I see the use case. I'm assuming manually adding a front-matter with
---
document_title: File
---
to each markdown file will be too cumbersome for you? (what's in the front-matter takes precedence over the config file)
Otherwise, can't really think of a fast solution for this, other than some better defaults for the title, e. g. file name or first h1
content.
Problem:
Outputs: /Users/user/path/config.js | Page 1 of 5
Setting
document_title
to a string value is a static value. Not settingdocument_title
outputs an empty string.Desired Outputs:
Request: Add the ability for the code to determine the file name of the document it is currently converting and being able to use that as the "title" value.