Skip to content

Commit

Permalink
Merge pull request #127 from iphands/master
Browse files Browse the repository at this point in the history
Add HTML element id to support deep linking
  • Loading branch information
sproogen authored Jan 15, 2022
2 parents 2c20ebc + 9e9ddeb commit f383c27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
{%- if site.version == 2 -%}
{% for section in site.content %}
<div class="container {{ section.layout }}-container">
<h3>{{ section.title }}</h3>
{%- if section.id -%}
<h3 id="{{ section.id }}">{{ section.title }}</h3>
{% else %}
<h3>{{ section.title }}</h3>
{%- endif -%}
{% include {{ section.layout | prepend: "section-" | append: ".html" }} content=section.content %}
</div>
{% endfor %}
Expand Down

0 comments on commit f383c27

Please sign in to comment.