1
0
Fork 0
forked from github/pelican

Put summary in notmyidea "description" HTML metadata

This commit is contained in:
Justin Mayer 2020-04-15 16:54:17 +02:00
commit d536cd2239
2 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,12 @@
{% extends "base.html" %}
{% block html_lang %}{{ article.lang }}{% endblock %}
{% block head -%}
{{ super() -}}
{% if article.summary %}
<meta name="description" content="{{ article.summary | striptags | safe | truncate(150) }}" />
{% endif %}
{% endblock %}
{% block title %}{{ article.title|striptags }}{% endblock %}
{% block extra_head %}

View file

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head>
{% block head %}
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
@ -12,6 +13,7 @@
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %}
{% block extra_head %}{% endblock extra_head %}
{% endblock head %}
</head>
<body id="index" class="home">