-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow overriding templates #146
Comments
What is it you're trying to override in the templates? Is there a way we could add support for new configuration options to make whatever you need possible? My concern is that if you just replace the templates outright, it makes updates very frail. It would be easy for someone to pull in a new version of dumb-pypi but forget to update the templates. It doesn't seem great for us to promote that kind of pattern. Another thing to keep in mind is that the generated HTML files are kind of already legacy and will probably be replaced with new PEP691 JSON files at some point, and it won't be possible to customize those with Jinja templates. So if there's something you want to change, it might be better to change it at a different layer. |
Oh, sorry for not responding quicker, this got buried in other issue notifications! I agree custom templates might be too brittle. I think the main ask is custom CSS so that I have greater control of how the generated index looks (branding, handling of the logo, etc).
Do you mean that you want to have dumb-pypi not generates these anymore at some point in the future? Or that you think the PEP 503/html based API may be deprecated/unsupported? One thing that I like about dumb-pypi is that the generated HTML gives me a simple index (in the html sense) page, which is a nice UI for people who want to look at the package index. |
Also one other related feature request, if you are planning on generating a root |
Hiya! I'm hoping to deploy dumb-pypi at $WORK and I wanted to ask if you would take a PR to allow for overriding templates.
I'm imagining an additional argument to point to another directory, and try to load the templates from there, falling back on the default files. This would obviously be entirely up to the user to make work, but it is slightly cleaner for me than just forking and keeping the fork up to date.
The text was updated successfully, but these errors were encountered: