Closed AX-LLaidley closed 1 year ago
Is there a specific need to specify title via and then use --title-from-h1
at the same time?
I would assume since you might be running it on several files, should have priority over the h1 generated one as there might be some without title.
The --drop-h1 should happen probably on both still.
@kovetskiy any thoughts?
You can see clearly there is a typo in the readme.md sample configuration. I worked around this a while ago by looking at the source code, but the inaccurate documentation on the page and lackluster examples really put me off initially, much as is happening with the poster above.
When I use the example configuration given in readme.md :
h1-title = true
h1-drop = true
I get:
2023-05-10 14:49:52.036 DEBUG drop-h1: false
2023-05-10 14:49:52.036 DEBUG title-from-h1: false
and an error:
2023-05-10 14:49:52.036 FATAL page title is not set ('Title' header is not set and '--title-from-h1' option and 'h1_title' config is not set or there is no H1 in the file)
If I look in the source code for the correct syntax: h1_title = true h1_drop = true
2023-05-10 14:45:55.682 DEBUG drop-h1: true
2023-05-10 14:45:55.682 DEBUG title-from-h1: true
It works fine. The documentation is just wrong.
No response from reporter, closing. Please feel free to reopen if the issue still exists.
What happened? When I include the
drop-h1
or--h1_drop
don't actually cause the initial H1 heading in the markdown doc to be dropped. This results in the H1 being used as the page title in Confluence (as it should be when--title-from-h1
or--h1_title
are used), and the H1 heading showing up at the beginning of the page text, where it shouldn't be, because the title is also present in the frontmatter. The only way I've found around this is to remove the H1 from the document entirely and rely on the title in the frontmatter.What did you expect to happen? I expected the H1 to be used to title the page in Confluence, and not to show up in the page text, as it should be dropped.
How can we reproduce the behavior you experienced? Steps to reproduce the behavior:
In case this is related to specific markdown, please provide a minimal markdown example here.
Information (please complete the following information):
Logs or other output
Additional context Add any other context about the problem here.