提交 d160a102 编写于 作者: S Samy Pessé

Add support for anchors in links

上级 01fdf948
......@@ -8,7 +8,7 @@
<span class="inner">
{% if article.path or 1 %}
{% if article.path %}
<a href="{{ article.path|contentURL }}">{{ article.title }}</a>
<a href="{{ article.path|contentURL }}{{ article.anchor }}">{{ article.title }}</a>
{% else %}
<a target="_blank" href="{{ article.url }}">{{ article.title }}</a>
{% endif %}
......
{% macro articles(_articles) %}
{% for article in _articles %}
<li class="chapter {% if article.path == file.path %}active{% endif %}" data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|contentURL }}"{% endif %}>
<li class="chapter {% if article.path == file.path and not article.anchor %}active{% endif %}" data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|resolveFile }}"{% endif %}>
{% if article.path %}
<a href="{{ article.path|resolveFile }}">
<a href="{{ article.path|contentURL }}{{ article.anchor }}">
{% else %}
<a target="_blank" href="{{ article.url }}">
{% endif %}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册