Compare commits
3 Commits
825caac4fa
...
12ac5ac1fb
Author | SHA1 | Date | |
---|---|---|---|
12ac5ac1fb | |||
d78493f3d0 | |||
84934c65e2 |
@ -38,7 +38,7 @@
|
||||
<meta property="twitter:image" content="{{ SITEURL }}/{{ article.twitter_image }}">
|
||||
{% endif %}
|
||||
{% elif article.header_cover %}
|
||||
<meta name="twitter:image" content="{{ SITEURL }}{{ article.header_cover }}">
|
||||
<meta name="twitter:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
||||
{% elif HEADER_COVER %}
|
||||
<meta name="twitter:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
||||
{% else %}
|
||||
@ -78,7 +78,7 @@
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.og_image }}">
|
||||
{% endif %}
|
||||
{% elif article.header_cover %}
|
||||
<meta property="og:image" content="{{ SITEURL }}{{ article.header_cover }}">
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
||||
{% elif HEADER_COVER %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
||||
{% else %}
|
||||
|
29
templates/last_articles.html
Normal file
29
templates/last_articles.html
Normal file
@ -0,0 +1,29 @@
|
||||
<h1 class="section-heading" style="font-variant: small-caps">Recent Articles</h1>
|
||||
{% for article in articles %}
|
||||
{% if loop.index > PAGE_PAGINATION %}{% break %}{% endif %}
|
||||
<div class="post-preview">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
|
||||
<h2 class="post-title">
|
||||
{{ article.title }}
|
||||
</h2>
|
||||
</a>
|
||||
{% if SHOW_FULL_ARTICLE %}
|
||||
{{ article.content }}
|
||||
{% else %}
|
||||
<p class="article-summary">
|
||||
{% if article.has_summary %}
|
||||
{{ article.summary }}
|
||||
{% elif article.summary %}
|
||||
{{ article.summary|striptags|truncate(140) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="post-meta">Posted by
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
on {{ article.locale_date }}
|
||||
</p>
|
||||
{% include 'comments.html' %}
|
||||
</div>
|
||||
{% endfor %}
|
@ -25,8 +25,33 @@
|
||||
</header>
|
||||
{% endblock header %}
|
||||
|
||||
{% block opengraph %}
|
||||
{{ super() }}
|
||||
{% if page.summary %}
|
||||
<meta property="og:description" content="{{ page.summary|striptags|truncate(140) }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.og_image %}
|
||||
{% if page.og_image|lower|truncate(4, True, '') == "http" %}
|
||||
<meta property="og:image" content="{{ page.og_image }}">
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ page.og_image }}">
|
||||
{% endif %}
|
||||
{% elif page.header_cover %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ page.header_cover }}">
|
||||
{% elif HEADER_COVER %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
{{ page.content }}
|
||||
{% if page.article_list and PAGE_PAGINATION > 0 %}
|
||||
<hr />
|
||||
{% include "last_articles.html" %}
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user