diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fd46ac6 --- /dev/null +++ b/Makefile @@ -0,0 +1,107 @@ +PY?=python +PELICAN?=pelican +PELICANOPTS= + +BASEDIR=$(CURDIR) +INPUTDIR=$(BASEDIR)/content +OUTPUTDIR=$(BASEDIR)/output +CONFFILE=$(BASEDIR)/pelicanconf.py +PUBLISHCONF=$(BASEDIR)/publishconf.py + +SSH_HOST=zaphoda +SSH_PORT=22 +SSH_USER=dan +SSH_TARGET_DIR=/var/www/unit.abbiamoundominio.org/minimo + +DATE := $(shell date +'%Y-%m-%d') +SLUG := $(shell echo '${NAME}' | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z) +EXT ?= md + +newpost: +ifdef NAME + echo "Title: $(NAME)" > $(INPUTDIR)/$(SLUG).$(EXT) + echo "Slug: $(SLUG)" >> $(INPUTDIR)/$(SLUG).$(EXT) + echo "Date: $(DATE)" >> $(INPUTDIR)/$(SLUG).$(EXT) + echo "" >> $(INPUTDIR)/$(SLUG).$(EXT) + ${EDITOR} ${INPUTDIR}/${SLUG}.${EXT} +else + @echo 'la variable NAME non è definita. Prova con:' + @echo 'make newpost NAME='"'"'data-nome-del-post'"'" +endif + +DEBUG ?= 0 +ifeq ($(DEBUG), 1) + PELICANOPTS += -D +endif + +RELATIVE ?= 0 +ifeq ($(RELATIVE), 1) + PELICANOPTS += --relative-urls +endif + +help: + @echo 'Makefile for a pelican Web site ' + @echo ' ' + @echo 'Usage: ' + @echo ' make newpost make newpost NAME='Nome del post' ' + @echo ' make html (re)generate the web site ' + @echo ' make clean remove the generated files ' + @echo ' make regenerate regenerate files upon modification ' + @echo ' make publish generate using production settings ' + @echo ' make serve [PORT=8000] serve site at http://localhost:8000' + @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' + @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' + @echo ' make stopserver stop local server ' + @echo ' make ssh_upload upload the web site via SSH ' + @echo ' make rsync_upload upload the web site via rsync+ssh ' + @echo ' ' + @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' + @echo 'Set the RELATIVE variable to 1 to enable relative urls ' + @echo ' ' + +html: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +clean: + [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) + +regenerate: + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +serve: +ifdef PORT + cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server +endif + +serve-global: +ifdef SERVER + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 $(SERVER) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 0.0.0.0 +endif + +devserver: +ifdef PORT + $(BASEDIR)/develop_server.sh restart $(PORT) +else + $(BASEDIR)/develop_server.sh restart +endif + +stopserver: + $(BASEDIR)/develop_server.sh stop + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' + +publish: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) + +ssh_upload: publish + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + +todo: html publish rsync_upload + +.PHONY: html help clean regenerate serve serve-global devserver stopserver publish ssh_upload rsync_upload diff --git a/README.md b/README.md index 14aec52..1df4561 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,16 @@ # Minimo Pelican theme -Minimo è un tema minimale per Pelican - -Con Archivio per data, categorie, tag e feed RSS. +Minimo è un tema minimale per Pelican con archivio per data, categorie, tag e feed RSS. Testato con [Pelican 3.7.1](https://docs.getpelican.com/en/3.7.1/) -# Installazione +**Installazione** apt install pelican markdown python3-pip git clone https://git.abbiamoundominio.org/dan/minimo.git -# Uso +**Uso** make newpost NAME='anno-riferimento-titolo-proposito' @@ -22,7 +20,7 @@ Testato con [Pelican 3.7.1](https://docs.getpelican.com/en/3.7.1/) (goto) http://localhost:8000/ -# Pubblicazione +**Pubblicazione** make html diff --git a/content/images/immagine.png b/content/images/immagine.png new file mode 100644 index 0000000..57b586d Binary files /dev/null and b/content/images/immagine.png differ diff --git a/content/macguffin.md b/content/macguffin.md new file mode 100644 index 0000000..9a38ce5 --- /dev/null +++ b/content/macguffin.md @@ -0,0 +1,33 @@ +Title: il MacGuffin +Author: dan +Date: 03 14 2019 +Slug: macguffin +Summary: Cos'è un MacGuffin +Category: Cinema +Tags: Cinema, MacGuffin + + +Un MacGuffin è qualcosa che fa andare avanti la storia. Anche se non c'entra nulla. + +Per esempio la valigetta di Pulp Fiction, nessuno vedrà mai cosa c'è dentro, non c'entra nulla con la storia, ma ce la +ricordiamo. Hitchcoch ha inventato il MacGuffin. il suo esempio più famoso si ha ne: La congiura degli innocenti. (The +trouble with Harry). + +**François Truffaut chiede ad Alfred Hitchcock di spiegare cos'è un MacGuffin.** + +*Si può immaginare una conversazione tra due uomini su un treno.* + +L'uno dice all'altro: "Che cos'è quel pacco che ha messo sul portabagagli?" + +L'altro: "Ah quello, è un MacGuffin" + +Allora il primo: "Che cos'è un MacGuffin?" + +L'altro: "È un marchingegno che serve per prendere i leoni sulle montagne Adirondack" + +Il primo: "Ma non ci sono leoni sulle Adirondack" + +Quindi l'altro conclude: "Bene, allora non è un MacGuffin!" + +*Come vedi, un MacGuffin non è nulla.* + diff --git a/content/media/archive.zip b/content/media/archive.zip new file mode 100644 index 0000000..e69de29 diff --git a/content/template.md b/content/template.md new file mode 100644 index 0000000..6ca7def --- /dev/null +++ b/content/template.md @@ -0,0 +1,75 @@ +Title: Template +Author: random unit hacklab scriba +Date: 03 15 2019 +Slug: template-url-definito +Summary: Qui si può mettere un sommario. Per index e feed. +Category: Template +Tags: Template, Markdown, Pelican + +# Campi + +L'articolo inizia con questi campi: + + Title: Template + Author: random unit hacklab scriba + Date: 03 15 2019 + Slug: template-url-definito + Summary: Qui si può mettere un sommario. Per index e feed. + Category: Template + Tags: Template, Markdown, Pelican + +Meglio usare poche definite Categories. Tags invece a pioggia. + +Si può usare il campo Authors (invece che Author) per definire diversi autori. + + Authors: quela, quelo + +Notare che solo il campo "Title" è necessario. + +Se non viene definito altro: + +* Author: sarà il nome di chi posta. +* Date: sarà la data di oggi. +* Slug: l'URL sarà derivato dal "Title" o definito dal pelicanconf.py +* Summary: saranno le prime righe del post. +* Category: sarà la categoria default definita dal pelicanconf.py o il nome della cartella. +* Tags: sarà vuoto il campo tags. + +# Markdown bits + + Questa riga contiene sia una parola in **grassetto** che una in *italico* e una parola `codice`. + +Questa riga contiene sia una parola in **grassetto** che una in *italico* e una parola `codice`. + +# Immagini + + ![scan]({attach}/images/immagine.png) + +![scan]({attach}/images/immagine.png) + +# link esterno + + [link esterno](https://autistici.org) + +[link esterno](https://autistici.org) + +# link a un articolo + + [link a un articolo]({filename}/macguffin.md) + +[link a un articolo]({filename}/macguffin.md) + +# link a un file + + [link a un file]({attach}/media/archive.zip) + +[link a un file]({attach}/media/archive.zip) + +# link a una tag + + [link a una tag]({tag}Cinema) + +[link a una tag]({tag}Cinema) + +Si può linkare ad autori, categorie, index e tag con: `{author}name`, `{category}name`, `{index}` e `{tag}name`. + diff --git a/pelicanconf.py b/pelicanconf.py new file mode 100644 index 0000000..233d2ed --- /dev/null +++ b/pelicanconf.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +AUTHOR = 'random unit hacklab scriba' +#AUTHOR_URL = 'pages/info.html' # punta a una pagina invece che a una lista di post. +SITENAME = "unit minimo" +#SITESUBTITLE = 'un sottitolo' +SITEURL = '' # viene definito in publishconf.py +PORT = 8000 +#BIND = '' +PATH = 'content' +TIMEZONE = 'Europe/Paris' +DEFAULT_LANG = 'it' +LOCALE = 'it_IT.utf8' +REVERSE_CATEGORY_ORDER = True +DEFAULT_PAGINATION = 3 +DEFAULT_DATE = 'fs' +DEFAULT_DATE_FORMAT = '%d %B %Y' + +# Feed generation attivata in publishconf.py +FEED_ALL_ATOM = None +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +FEED_MAX_ITEMS = 9 +RSS_FEED_SUMMARY_ONLY = True + +THEME = 'themes/minimo' + +MENUITEMS = (('ARCHIVIO |', '/minimo/archives.html'), + ('CATEGORIE |', '/minimo/categories.html'), + ('TAG |', '/minimo/tags.html'), + ('RSS |', '/minimo/feeds/all.rss.xml'), + ('HOME', '../index.html'),) + +#LINKS = (('titolo', 'https://eccetera'), +# ('in verità non sono in uso', 'https://eccetera'), +# ('infatti sono commentati', 'https://yayayaya'),) + +#LINKS_WIDGET_NAME = 'INVECE CHE CHIAMARLI LINK' + +# Settare su true solo in sviluppo, settare su falso o commentare in pubblicazione +#RELATIVE_URLS = True + +DEFAULT_METADATA = {'unit hacklab': 'This is a Game Planet'} + +# static paths will be copied without parsing their contents +STATIC_PATHS = [ + 'images', + 'deep', + 'media', + 'media/robots.txt', + 'media/favicon.ico', +] + +EXTRA_PATH_METADATA = { + 'media/robots.txt': {'path': 'robots.txt'}, + 'media/favicon.ico': {'path': 'favicon.ico'}, +} + +# custom page generated with a jinja2 template +#TEMPLATE_PAGES = {'pages/jinja2_template.html': 'jinja2_template.html'} + +## code blocks with line numbers +#PYGMENTS_RST_OPTIONS = {'linenos': 'table'} +#PYGMENTS_RST_OPTIONS = {'classprefix': 'pgcss', 'linenos': 'table'} + +MARKDOWN = { + 'extension_configs': { + 'markdown.extensions.codehilite': {'css_class': 'highlight'}, + 'markdown.extensions.extra': {}, + 'markdown.extensions.meta': {}, + }, + 'output_format': 'html5', +} + +USE_FOLDER_AS_CATEGORY = True +DEFAULT_CATEGORY = 'pizzini' +DISPLAY_PAGES_ON_MENU = False +DISPLAY_CATEGORIES_ON_MENU = False +HIDE_CATEGORIES_FROM_MENU = True + +## Se False, i post con data nel futuro sono dei draft, sennò li pubblica cmq. +WITH_FUTURE_DATES = False + +OUTPUT_RETENTION = [] +OUTPUT_RETENTION = [".hg", ".git", ".bzr"] +IGNORE_FILES = ['.#*'] + +#CHECK_MODIFIED_METHOD = 'mtime' + +#ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/' +#ARTICLE_URL = 'posts/{date:%Y}/{slug}/' +#ARTICLE_URL = '{date:%Y}/{category}/{slug}/' + +#ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html' +#ARTICLE_SAVE_AS = 'posts/{date:%Y}/{slug}/index.html' +#ARTICLE_SAVE_AS = '{author}-{slug}.html' + +#PAGE_URL = 'pages/{slug}/' +#PAGE_SAVE_AS = 'pages/{slug}/index.html' diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..162e0de --- /dev/null +++ b/publishconf.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# This file is only used if you use `make publish` or +# explicitly specify it as your config file. + +import os +import sys +sys.path.append(os.curdir) +from pelicanconf import * + +SITEURL = 'https://unit.abbiamoundominio.org/minimo' +RELATIVE_URLS = False + +#FEED_ALL_ATOM = 'feeds/all.atom.xml' +#CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' + +FEED_ALL_RSS = 'feeds/all.rss.xml' +#CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml' +CATEGORY_FEED_RSS = 'feeds/category_%s.rss.xml' + +## RSS anche delle tag +#TAG_FEED_ATOM = "feeds/tag_%s.atom.xml" +TAG_FEED_RSS = "feeds/tag_%s.rss.xml" + +#TRANSLATION_FEED_RSS = None + +DELETE_OUTPUT_DIRECTORY = True diff --git a/themes/minimo/static/css/style.css b/themes/minimo/static/css/style.css new file mode 100644 index 0000000..8bcc524 --- /dev/null +++ b/themes/minimo/static/css/style.css @@ -0,0 +1,37 @@ +body { + font-family: "Courier New", Courier, monospace + font-size: 100%; + background-color: #F4F4E8; + color: #333333; + min-width: 400px; + min-height: 200px; + margin: 2% 2%; + padding:0; + height:98%;; + margin-left: 33%; + margin-right: 33%; +} + +a:link { color: #003399; text-decoration: none; } +a:visited { color: #336699; text-decoration: none; } +a:hover { color: #003399; background: #ff8c19; text-decoration: none; } + +h1 a { color: inherit !important } +h2 a { color: inherit !important } +h3 a { color: inherit !important } +h4 a { color: inherit !important } +h5 a { color: inherit !important } +h6 a { color: inherit !important } + +#menu li { + display: inline; +} + +#post-list { + margin-bottom: 1em; + margin-top: 1em; +} + +pre { + margin: 2em 1em 2em 4em; +} diff --git a/themes/minimo/templates/archives.html b/themes/minimo/templates/archives.html new file mode 100644 index 0000000..7b9b10d --- /dev/null +++ b/themes/minimo/templates/archives.html @@ -0,0 +1,42 @@ +{% extends "index.html" %} +{% block title %}Archivio {{ SITENAME }}{% endblock %} +{% block ogtitle %}Archivio {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/archives.html{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/archives.html{%endblock%} + +{% block content %} +
+
+

{% block content_title %}Archivio per data{% endblock %}

+ + {% for article in dates %} + {% set this_year = article.date.strftime('%Y') %} + + {% if this_year != prev_year %} +
+
{{ this_year }}
+
+ {% endif %} + {% if this_year != prev_year or this_month != prev_month %} +
+
{{ this_month }}
+
+ {% endif %} +
+ {% if this_month != prev_month or this_day != prev_day %} +
+ {{ this_day }} +
+ {% endif %} +
+
{{ article.title }} {{ article.category }}
+
+
+ {% set prev_year = this_year %} + {% set prev_month = this_month %} + {% set prev_day = this_day %} + {% endfor %} +
+
+{% endblock %} + diff --git a/themes/minimo/templates/article.html b/themes/minimo/templates/article.html new file mode 100644 index 0000000..2055670 --- /dev/null +++ b/themes/minimo/templates/article.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block title %}{{ article.title|striptags }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ article.title|striptags }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ article.url }}{%endblock%} +{% block ogtype %}article{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ article.url }}{%endblock%} + +{% block content %} + +
+
+
+
+

+ {{ article.title}}

+
+ +
+ {% include 'article_infos.html' %} + {{ article.content }} +
+ +
+
+
+{% endblock %} diff --git a/themes/minimo/templates/article_infos.html b/themes/minimo/templates/article_infos.html new file mode 100644 index 0000000..4254863 --- /dev/null +++ b/themes/minimo/templates/article_infos.html @@ -0,0 +1,25 @@ + diff --git a/themes/minimo/templates/author.html b/themes/minimo/templates/author.html new file mode 100644 index 0000000..e5db843 --- /dev/null +++ b/themes/minimo/templates/author.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ author }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ author.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ author.url }}{%endblock%} diff --git a/themes/minimo/templates/base.html b/themes/minimo/templates/base.html new file mode 100644 index 0000000..c1a89f1 --- /dev/null +++ b/themes/minimo/templates/base.html @@ -0,0 +1,71 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + {% endblock head %} + + + + + + {% block content %} + {% endblock %} + + + + + diff --git a/themes/minimo/templates/categories.html b/themes/minimo/templates/categories.html new file mode 100644 index 0000000..2ec2f33 --- /dev/null +++ b/themes/minimo/templates/categories.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} +{% block title %}Categorie di {{ SITENAME }}{% endblock %} +{% block ogtitle %}Categorie di {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/categories.html{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/categories.html{%endblock%} + +{% block content %} +
+
+

{% block content_title %}Categorie {% endblock %}

+ +
+ {% for category, articles in categories %} +
{{ category }} ({{ articles|count }})
+ {% endfor %} +
+
+
+{% endblock %} diff --git a/themes/minimo/templates/category.html b/themes/minimo/templates/category.html new file mode 100644 index 0000000..d38824e --- /dev/null +++ b/themes/minimo/templates/category.html @@ -0,0 +1,6 @@ +{% extends "archives.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %} +{% block content_title %} Ricerca per categoria: {{ category }}{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ category }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ category.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ category.url }}{%endblock%} diff --git a/themes/minimo/templates/index.html b/themes/minimo/templates/index.html new file mode 100644 index 0000000..d325ad1 --- /dev/null +++ b/themes/minimo/templates/index.html @@ -0,0 +1,74 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block ogtitle %}{{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}{%endblock%} + +{% block content %} +
+ {% if articles %} + {% for article in articles_page.object_list %} + {% if loop.length > 0 %} + {% if loop.first %} +
+
    + {% endif %} + + {% if loop.last %} +
+ {% if loop.last and (articles_page.has_previous() + or not articles_page.has_previous() and loop.length > 1) %} + {% include 'pagination.html' %} + {% endif %} +
+ {% endif %} + {% endif %} + {% endfor %} + {% else %} +
+

Pages

+ {% for page in PAGES %} +
  • {{ page.title }}
  • + {% endfor %} +
    + {% endif %} +
    +{% endblock content %} + +{% if LINKS %} +
    +

    Links

    + +
    +{% endif %} +{% if TAG_CLOUD_STEPS %} +
    +

    Tags

    + +
    +{% endif %} + diff --git a/themes/minimo/templates/page.html b/themes/minimo/templates/page.html new file mode 100644 index 0000000..6ff8139 --- /dev/null +++ b/themes/minimo/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }} | {{ SITENAME }}{% endblock %} +{% block ogtitle %}{{ page.title|striptags }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ page.url }}{%endblock%}%} +{% block canonicalurl %}{{ SITEURL }}/{{ page.url }}{%endblock%} + +{% block content %} +
    +

    {{ page.title }}

    + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + {{ page.content }} +
    +{% endblock %} + diff --git a/themes/minimo/templates/tag.html b/themes/minimo/templates/tag.html new file mode 100644 index 0000000..293c64e --- /dev/null +++ b/themes/minimo/templates/tag.html @@ -0,0 +1,6 @@ +{% extends "archives.html" %} +{% block title %}{{ SITENAME }} - {{ tag }} | {{ SITENAME }}{% endblock %} +{% block content_title %}Ricerca per tag: "{{ tag }}"{% endblock %} +{% block ogtitle %}{{ SITENAME }} - {{ tag }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%} +{% block canonicalurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%} diff --git a/themes/minimo/templates/tags.html b/themes/minimo/templates/tags.html new file mode 100644 index 0000000..b81ff60 --- /dev/null +++ b/themes/minimo/templates/tags.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} +{% block title %}Tags in {{ SITENAME }}{% endblock %} +{% block ogtitle %}Tags in {{ SITENAME }}{% endblock %} +{% block ogurl %}{{ SITEURL }}/tags.html{%endblock%}%} +{% block canonicalurl %}{{ SITEURL }}/tags.html{%endblock%} + +{% block content %} +
    +
    +

    {% block content_title %}Tags{% endblock %}

    + +
    + {% for tag, articles in tags|sort %} +
    {{ tag }} ({{ articles|count }})
    + {% endfor %} +
    +
    +
    +{% endblock %} diff --git a/themes/minimo/templates/translations.html b/themes/minimo/templates/translations.html new file mode 100644 index 0000000..75ed375 --- /dev/null +++ b/themes/minimo/templates/translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} +{% if article.translations %} +
    +Translations: + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} +{% endmacro %} +