-
Notifications
You must be signed in to change notification settings - Fork 11
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 templates for generated pages #3
Comments
How would that work? I still know very little about Sphinx, so I'm not sure how you intend this. |
I was thinking to use some sort of templating to configure the look and feel of the tags overview page. For example: https://stackoverflow.com/questions/13209597/override-html-page-template-for-a-specific-sphinx-document I tried looking for solutions but I don't have any specific ideas right now. |
Yeah, I get the template idea, I have some minor modifications like that in my project (some are pretty difficult to implement, e.g. if you want your logo in the sidebar to be below the title - no problem! but to have it above it I ended up making a single logo+title png file :D) |
I would find this useful as well. Style
For customizing style, that can already be done on the user's end with Sphinx's ContentInstead of making HTML templates, this could be done with 4 small markup templates:
This would basically replace what sphinx-tags currently does in Extension exampleHere's an example for the autosummary extension, with both the directive code and template files: https://github.com/sphinx-doc/sphinx/tree/master/sphinx/ext/autosummary
Jinja exampleHere's a quick (probably incorrect, but close enough) example of what a MyST template for (tagoverview)=
# {{ tags_overview_title }}
{% raw %}
```{toctree}
{% endraw %}
---
caption: {{ tags_index_head }}
maxdepth: 1
---
{% for tag in tags %}
{{ tag.name }} ({{ len(tag.items) }}) <{{ tag.name }}>
{%- endfor %}
``` |
Highest priority is to set up templating for the tags overview page.
The text was updated successfully, but these errors were encountered: