Describe the feature
Currently, this extension has no way of knowing whether an inserted template is related to ABlog. For example:
from https://github.com/sunpy/ablog/blob/main/ablog/templates/authors.html :
{% if ablog.author %}
<h3><a href="{{ pathto(ablog.author.path) }}">{{ gettext('Authors') }}</a></h3>
<ul>
{% for coll in ablog.author %} {% if coll %}
<li>
<a href="{{ pathto(coll.docname) }}">{{ coll }} ({{ coll|length }})</a>
</li>
{% endif %} {% endfor %}
</ul>
{% endif %}
This makes it harder to create CSS rules that make ABlog behave in certain ways (e.g. as a part of themes)
Proposed solution
An easy path forward would be to wrap all of those ablog templates with a CSS selector that was unique to the template. For example:
{% if ablog.author %}
<div class="ablog-sidebar-item ablog__authors">
<h3><a href="{{ pathto(ablog.author.path) }}">{{ gettext('Authors') }}</a></h3>
<ul>
{% for coll in ablog.author %} {% if coll %}
<li>
<a href="{{ pathto(coll.docname) }}">{{ coll }} ({{ coll|length }})</a>
</li>
{% endif %} {% endfor %}
</ul>
</div>
{% endif %}
References
I think this is related to:
Describe the feature
Currently, this extension has no way of knowing whether an inserted template is related to
ABlog. For example:from https://github.com/sunpy/ablog/blob/main/ablog/templates/authors.html :
{% if ablog.author %} <h3><a href="{{ pathto(ablog.author.path) }}">{{ gettext('Authors') }}</a></h3> <ul> {% for coll in ablog.author %} {% if coll %} <li> <a href="{{ pathto(coll.docname) }}">{{ coll }} ({{ coll|length }})</a> </li> {% endif %} {% endfor %} </ul> {% endif %}This makes it harder to create CSS rules that make ABlog behave in certain ways (e.g. as a part of themes)
Proposed solution
An easy path forward would be to wrap all of those
ablogtemplates with a CSS selector that was unique to the template. For example:{% if ablog.author %} <div class="ablog-sidebar-item ablog__authors"> <h3><a href="{{ pathto(ablog.author.path) }}">{{ gettext('Authors') }}</a></h3> <ul> {% for coll in ablog.author %} {% if coll %} <li> <a href="{{ pathto(coll.docname) }}">{{ coll }} ({{ coll|length }})</a> </li> {% endif %} {% endfor %} </ul> </div> {% endif %}References
I think this is related to: