Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion wg.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,20 @@ <h3><a href="https://github.com/ircv3/ircv3-specifications/milestone/4">Roadmap<
</div>

{% for post in site.posts limit:10 %}
{% comment %} add a prefix to ids to avoid duplicates within the same page {% endcomment %}
{% assign h3_prefix = '<h3 id="' | append: post.id | append: '-' | replace_first: '/', '' %}
{% assign h4_prefix = '<h4 id="' | append: post.id | append: '-' | replace_first: '/', '' %}
{% assign h5_prefix = '<h5 id="' | append: post.id | append: '-' | replace_first: '/', '' %}
{% assign h6_prefix = '<h6 id="' | append: post.id | append: '-' | replace_first: '/', '' %}
<div class="post">
<h3><a href="{{ post.url }}">{{ post.title | xml_escape }}</a> <span class="meta">{{ post.date | date_to_string }}</span></h3>
<div class="post-content">
{{ post.content }}
{{ post.content
| replace: '<h6 id="', h6_prefix
| replace: '<h5 id="', h5_prefix
| replace: '<h4 id="', h4_prefix
| replace: '<h3 id="', h3_prefix
}}
</div>
</div>
{% endfor %}
Expand Down