-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Move layout/sidebar into frame.html.jinja2
#346
Comments
FWIW, the workaround I did can be found here: |
Are you aware of If you want to keep the side bar / menu, you should be able to extend |
Yes that is true --- I guess I was thinking of making a page-that-has-a-nav that could be the common ancestor of both module and index.html, instead of having index inherit from module. In my case, I would have added another page template that inherited from this common ancestor instead of from the module template.
The one place this did not work for me was the code that cleverly figures out whether links should be local or not --- I used that in the nav, both on module pages and on non-module pages. |
I think that is a fair point - historically the index page did not have the same sidebar layout, and when I switched it over I went the lazy way and directly inherited from |
Honestly I'd rather leave refactoring like that to you --- I'm sure your sensitivity to fine feature details will be better than mine on this :-) |
frame.html.jinja2
Thanks again for the useful feedback. I found a few hours today to properly revise the templates, the layout/sidebare now lives in |
I was using pdoc 8.3.0, with some custom template modifications using the Is it possible that this issue is related to these problems? Thanks @mhils EDIT: nevermind, I found it myself (sorry, I was expecting to find that info looking to the issues) |
I had the same issue @abubelinha -- You probably define your own |
Thanks a lot @denised ... now I'm on 10.0.1 🥇 😅 |
Problem Description
In my pdoc-powered site, I wished to combine elements of pdoc and non-pdoc content on the same pages. In order to do this, I had to set the 'module' variable, even though it didn't make sense in this context. It is possible to work around, but somewhat awkward.
Proposal
Go through the code and find every place that module is used, and ensure that the code would work with a null object instead. This might perhaps be limited to the nav part of the template (leaving the main part of the template breaking if module isn't an actual value, which kinda makes sense).
Alternatives
template.render
. If there isn't enough interest, we can just leave it at that.module.html.jinja2
that doesn't require themodule
variable to be set, and have `module.html.jinja2' (and 'index.html.jinja2') inherit from that. This would make sense, but it would probably also be a breaking change, so perhaps not a good idea.Additional context
You can see the site I have created at https://projectdrawdown.github.io/solutions/. I want to have the nav on all pages, even those that aren't module pages, and thus needed to do the workaround.
Also, I am willing to do this work, if it seems worthwhile.
The text was updated successfully, but these errors were encountered: