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

variable to hold common head and end of body content for HTML #2320

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ascholerChemeketa
Copy link
Contributor

This makes a variable to hold the head and end of body contents inserted into each page that is common to all pages generated for a document.

It provides a decent speedup to the file-wrap template, but also serves as a way to allow different page types to leverage the same list of insertions. I have not extended this to standalone-page or create-iframe-page, but we could do so. They would be a subset of file-wrap-simple-XXX varaibles.

@ascholerChemeketa
Copy link
Contributor Author

The diffs for this are not clean as one or two page specific items had to be shifted as did the search js that is only part of the full page and not simple.

But if you examine them, you should see a few chunks that just shifted relative order.

@ascholerChemeketa ascholerChemeketa force-pushed the html-head-content-consolidation branch from 7fd4526 to b789e74 Compare December 13, 2024 23:54
@ascholerChemeketa
Copy link
Contributor Author

Force pushed to rebase against master post Oscar's update

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 17, 2024

I'm getting bit by what I am forever warning everybody else about. :-(

The knowl template is a named template. But it applies the type-name template, which uses context to localize the button text ("Evaluate" in English).

  • The knowl template should move to a match="*" and an xsl:apply-templates. My fault: I think I know how that crept in a while ago.
  • Then it should be obvious that this template can't be rolled up into a massive pre-built variable.
  • Sample article produced a warning. Is there no Sage in the sample book? Perhaps not. The sample article has everything but the kitchen sink, or close to that.
  • I'd love to see this approach enacted for the other page-construction templates. Hint, hint.

@ascholerChemeketa
Copy link
Contributor Author

OK, will go look into those and implement for standalone-page or create-iframe-page.

@ascholerChemeketa
Copy link
Contributor Author

Updates with requested changes.

Notes:

  • standalone-page does not appear to have had mathjax previously, it looks like it should so I added it.
  • standalone-page had the runestone ethical ads, which doesn't look like it belongs there. Removed it.

Diffs are even messier now as factoring out the templates into subsets required reordering templates that were called in different order in different places. :(

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.

2 participants