Support for link posts through the Link: metadata field
parent
77b73d0ab2
commit
9f2ca43677
|
@ -12,7 +12,7 @@
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
{% for article in dates %}
|
{% for article in dates %}
|
||||||
<dt class="col-sm-4">{{ article.locale_date }}</dt>
|
<dt class="col-sm-4">{{ article.locale_date }}</dt>
|
||||||
<dd class="col-sm-8"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
<dd class="col-sm-8"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}{% if article.link %} <i class="fas fa-link"></i>{% endif %}</a></dd>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -10,7 +10,13 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
{% block page_header %}
|
||||||
|
{% if article.link %}
|
||||||
|
<a href="{{ article.link }}" rel="bookmark">
|
||||||
|
{% endif %}
|
||||||
{{ article.title }}
|
{{ article.title }}
|
||||||
|
{% if article.link %}
|
||||||
|
<i class="fas fa-link"></i></a>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -53,6 +59,11 @@
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ article.content }}
|
{{ article.content }}
|
||||||
|
{% if article.link %}
|
||||||
|
<p class="link-button"><a href="{{ article.link }}" rel="bookmark">
|
||||||
|
<i class="fas fa-link"></i> view link
|
||||||
|
</a></p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{% include 'include/comments.html' %}
|
{% include 'include/comments.html' %}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</header>
|
</header>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<h4 class="title">
|
<h4 class="title">
|
||||||
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
|
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}{% if article.link %} <i class="fas fa-link"></i>{% endif %}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ article.summary|striptags }}
|
{{ article.summary|striptags }}
|
||||||
|
|
|
@ -59,6 +59,11 @@ RFG_FAVICONS = True
|
||||||
unzip -l <PATH_TO_PACKAGE>.zip
|
unzip -l <PATH_TO_PACKAGE>.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Link posts
|
||||||
|
|
||||||
|
When adding a Link: field to the post's metadata header, the article will be rendered as a link post, which means a link icon will appear behind its title, and the title of the article will link to the destination of the link when viewing the article page. In that same page a 'view link' link/button will be rendered at the end of the content.
|
||||||
|
|
||||||
|
|
||||||
## Use `sitemap.xml`
|
## Use `sitemap.xml`
|
||||||
|
|
||||||
There is a `sitemap.html` Jinja2 template that can be used to [generate a sitemap](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml).
|
There is a `sitemap.html` Jinja2 template that can be used to [generate a sitemap](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml).
|
||||||
|
|
Loading…
Reference in New Issue