-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandoc does not set <title>
despite emitting Defaulting to '<basename>' as the title.
#9370
Comments
<title>
despite emiting Defaulting to '<basename>' as the title.
<title>
despite emitting Defaulting to '<basename>' as the title.
The default template has this:
Do you have something similar in your custom template? You need |
I do not want pandoc to set the title, so I do not have However, it works as expected with
I did not used the same machine (but should not make any difference):
|
It's true that the warning is misleading if you're not using a template that uses It could be interesting to expose a function in jgm/doctemplates that would return a list of the variables in a template. (This would be trivial to write.) We could then check to see if the template contains |
I have just noticed that we get a warning even if the template.html:
source file:
convert to html:
|
We would have to read and parse the template on every invocation. Not worth it, in my opinion (performance price for every use just to deal with this one unusual use). Just add a pagetitle to avoid the warning? EDIT: checking the template for the presence of a pagetitle variable, as suggested above, would also help with this. That is why I am keeping this issue open, but it would need work in doctemplates. |
I understand that it is not worth it. Yet, I do not want to add a variable that I do not need to silence a warning. Perhaps the warning could be reworded (e.g. state that it does not apply if
Glad to hear that, but unfortunately I am not able to help... Thanks! |
The change to doctemplates should be easy; I'll make a note to work on that. |
When writing to a (custom) html template, pandoc does not set
<title>
despite emittingDefaulting to '<basename>' as the title.
However, I am glad with the current behaviour (i.e. warn that a title is needed + not setting the title + advice on how to set the title using pandoc). I think setting the title automatically would be too invasive (e.g. I want to set the title later using js).
template.html:
source file:
convert to html:
The text was updated successfully, but these errors were encountered: