Implement backlinks
This commit is contained in:
@ -74,7 +74,7 @@
|
||||
{%- if page.extra.toc and page.toc | length > 0 -%}
|
||||
<details id="toc" class="closable">
|
||||
<summary title="{{ macros_translate::translate(key='table_of_contents', default='Table of Contents', language_strings=language_strings) }}"><i class="icon"></i></summary>
|
||||
<div id="toc-dropdown">
|
||||
<div>
|
||||
<strong class="title">{{ macros_translate::translate(key="table_of_contents", default="Table of Contents", language_strings=language_strings) }}</strong>
|
||||
<div>
|
||||
<{{ list_element }}>
|
||||
@ -97,6 +97,23 @@
|
||||
</div>
|
||||
</details>
|
||||
{%- endif -%}
|
||||
{%- if config.extra.show_backlinks and page.backlinks | length > 0 -%}
|
||||
<details id="backlinks" class="closable">
|
||||
<summary title="{{ macros_translate::translate(key='backlinks', default='Backlinks', language_strings=language_strings) }}"><i class="icon"></i></summary>
|
||||
<div>
|
||||
<strong class="title">{{ macros_translate::translate(key="backlinks", default="Backlinks", language_strings=language_strings) }}</strong>
|
||||
<div>
|
||||
<ul>
|
||||
{%- for backlink in page.backlinks -%}
|
||||
<li>
|
||||
<a href="{{ backlink.permalink }}">{{ backlink.title }}</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
{%- endif -%}
|
||||
<a id="go-to-top" href="#top" title="{{ macros_translate::translate(key='go_to_top', default='Go to Top', language_strings=language_strings) }}"><i class="icon"></i></a>
|
||||
{%- if config.extra.show_share_button -%}
|
||||
<a id="share" href="https://shareopenly.org/share/?url={{ page.permalink }}&text={{ page.description | urlencode }}" rel="{{ rel_attributes }}" title="{{ macros_translate::translate(key='share', default='Share', language_strings=language_strings) }}"><i class="icon"></i></a>
|
||||
@ -117,17 +134,6 @@
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
|
||||
{%- if config.extra.show_backlinks and page.backlinks | length > 0 -%}
|
||||
<h2>{{ macros_translate::translate(key="backlinks", default="Backlinks", language_strings=language_strings) }}</h2>
|
||||
<ul>
|
||||
{%- for backlink in page.backlinks -%}
|
||||
<li>
|
||||
<a href="{{ backlink.permalink }}">{{ backlink.title }}</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if page.extra.comments.id -%}
|
||||
{% include "partials/comments.html" %}
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user