Skip to content

Custom delimiter in page titles #1490

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

Open
rsapkf opened this issue Mar 18, 2021 · 2 comments
Open

Custom delimiter in page titles #1490

rsapkf opened this issue Mar 18, 2021 · 2 comments

Comments

@rsapkf
Copy link
Contributor

rsapkf commented Mar 18, 2021

Currently, the delimiter - for page titles is hardcoded here. This sets the page title to {{ chapter_title }} - {{ book_title }}.

It would be nice to have a config option in book.toml named something like delimiter to have this behaviour:

[output.html]
delimiter = "::" # custom delimiter

will expose the property title as {{ chapter_title }} {{ title_delimiter }} {{ book_title }} to index.hbs.

Currently it is possible to achieve this by replacing {{ title }} in /theme/index.hbs by {{ chapter_title }} :: {{ book_title }}. But I think the config option would be cleaner and less hacky.

@d47081
Copy link

d47081 commented Apr 9, 2025

According to the code in line above, the custom title tags (that includes parent names, #2652) are not supported yet?

@szabgab
Copy link
Contributor

szabgab commented Apr 9, 2025

as far as I know, it is not supported yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants