-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add baseof.html layout to docs #31608
Conversation
@NotWoods Thanks for the PR. Can you rebase this please? @regisphilibert could you also have a quick look please? |
4c3727e
to
f18d529
Compare
Indeed, I'd like to always have a body class, but maybe we should tackle that later. My idea was to has a body class automatically generated based on the layout used and page's file path (with slashes and the extension removed). I think your patch is a good start and can land as is for now :) |
BTW it seems the example.html is left out. |
I changed it around to use a block for the class, and that can be expanded upon later to generate a class name from the page path. |
I'll revert the change since it doesn't make sense to have this unless it's ready. About examples, I still think we could reuse some of the partials, but I'll leave this to explore later. Like scripts.html and try to generate the placeholder inline CSS from Sass instead of manually hardcoding its output. |
I'll do a little more testing later and merge this. Thanks for your contribution(s)! |
@NotWoods can you apply this against my v4-dev-xmr-hugo branch too please? The only difference is the meta viewport tag and the fact that we don't include footer.html in the docs layout. |
For #28479
Adds a base layout used by most other layouts. Also adds a base "redirect" layout to avoid some duplication.
Biggest sticking point here is
body_override
.Seems like hugo doesn't like having an attribute defined like this:
Since this is used just for the class attribute, you could add a class override like this:
But then you have
<body class="">
on most pages. The issue indicates that you may want to add a body class for most pages anyways, so if this is a preferable approach let me know.Preview: https://deploy-preview-31608--twbs-bootstrap.netlify.app/
TODO: