Skip to content
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

feat: header/footer template from file #29

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

skyf0l
Copy link

@skyf0l skyf0l commented Nov 15, 2023

No description provided.

Copy link
Owner

@HollowMan6 HollowMan6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a use case and updating the book.toml for demoing this at test_doc?

The feature is OK for me, but I'm curious why you want to render a header/footer template from a file. How complicated would that template be so that string is not enough?

@skyf0l
Copy link
Author

skyf0l commented Nov 15, 2023

In order to export my documentation in a specific format expected by my school, I need to include a lot of text and images in the header/footer.

I could have put everything in the footer/header-template parameter, but it would have been ugly and unmaintainable.

test_doc/book.toml Outdated Show resolved Hide resolved
skyf0l and others added 3 commits November 16, 2023 18:08
Comment on lines +1 to +3
<p style="font-size: 10px; margin-left: 48%">
<span class="pageNumber"></span> / <span class="totalPages"></span>
</p>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to export my documentation in a specific format expected by my school, I need to include a lot of text and images in the header/footer.

I could have put everything in the footer/header-template parameter, but it would have been ugly and unmaintainable.

Actually, I have been asked about the template from file thing before #19 (comment) I thought Chromium doesn't support rendering complicated header/footer templates. If you are fine with that, can you commit those templates that include text and images directly into this test_doc here (of course remove the sensitive information as well as copyrighted images)?

@skyf0l

Hmm, can you replace the template with a valid one that can fully demonstrate the feature you are adding here (you can replace the image with any uncopyrighted one)? Which is the one you mentioned that "contains a lot of text and images in the header/footer, and it can be ugly and unmaintainable if written in one line."

Please don't just copy and paste my example, since it can still be straightforward to maintain in one line, and it contains no images. The reason why I have a strong demand on this is that, as I mentioned earlier #19 (comment), I thought we don't support rendering complicated header/footer templates (e.g. containing images) The feature you are adding here will be meaningless if the template can still be easily maintained in one line. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants