Skip to content

Commit 4795fb7

Browse files
authored
Merge pull request #63 from QuLogic/section-headers
Add section heading links.
2 parents bf72327 + 7dad7d7 commit 4795fb7

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
@@ -3,10 +3,16 @@
33
<div>
44
<table>
55
{% for section in config %}
6-
<tr>
7-
<td colspan=5 style="height:4em; vertical-align:center">
8-
<h3><a name="#{{ section.name }}">{{ section.name }}</a></h3></td>
9-
</tr>
6+
<tr>
7+
<td colspan=5 style="height:4em; vertical-align:center">
8+
{% with section_id = section.name | lower | replace(" ", "-") %}
9+
<h3 id="{{ section_id }}">
10+
{{ section.name }}
11+
<a class="headerlink" href="#{{ section_id }}" title="Permalink to this headline">¶</a>
12+
</h3>
13+
{% endwith %}
14+
</td>
15+
</tr>
1016

1117
{% for package in section.packages %}
1218
<tr>

0 commit comments

Comments
 (0)