Skip to content

Commit 7dad7d7

Browse files
committed
Add section heading links.
Fixes #61.
1 parent ad232fb commit 7dad7d7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

python/template.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
<div>
1111
<table>
1212
{% for section in config %}
13-
<tr>
14-
<td colspan=5 style="height:4em; vertical-align:center">
15-
<h3><a name="#{{ section.name }}">{{ section.name }}</a></h3></td>
16-
</tr>
13+
<tr>
14+
<td colspan=5 style="height:4em; vertical-align:center">
15+
{% with section_id = section.name | lower | replace(" ", "-") %}
16+
<h3 id="{{ section_id }}">
17+
{{ section.name }}
18+
<a class="headerlink" href="#{{ section_id }}" title="Permalink to this headline">¶</a>
19+
</h3>
20+
{% endwith %}
21+
</td>
22+
</tr>
1723

1824
{% for package in section.packages %}
1925
<tr>

0 commit comments

Comments
 (0)