first commit

This commit is contained in:
dan 2019-03-16 03:42:59 +01:00
parent e9309e72ca
commit f706a2f0ce
21 changed files with 709 additions and 6 deletions

107
Makefile Normal file
View File

@ -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

View File

@ -1,18 +1,16 @@
# Minimo Pelican theme # Minimo Pelican theme
Minimo è un tema minimale per Pelican Minimo è un tema minimale per Pelican con archivio per data, categorie, tag e feed RSS.
Con Archivio per data, categorie, tag e feed RSS.
Testato con [Pelican 3.7.1](https://docs.getpelican.com/en/3.7.1/) Testato con [Pelican 3.7.1](https://docs.getpelican.com/en/3.7.1/)
# Installazione **Installazione**
apt install pelican markdown python3-pip apt install pelican markdown python3-pip
git clone https://git.abbiamoundominio.org/dan/minimo.git git clone https://git.abbiamoundominio.org/dan/minimo.git
# Uso **Uso**
make newpost NAME='anno-riferimento-titolo-proposito' 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/ (goto) http://localhost:8000/
# Pubblicazione **Pubblicazione**
make html make html

BIN
content/images/immagine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

33
content/macguffin.md Normal file
View File

@ -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.*

View File

75
content/template.md Normal file
View File

@ -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`.

104
pelicanconf.py Normal file
View File

@ -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'

29
publishconf.py Normal file
View File

@ -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

View File

@ -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;
}

View File

@ -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 %}
<div class="span9">
<section>
<h1>{% block content_title %}Archivio per data{% endblock %}</h1>
{% for article in dates %}
{% set this_year = article.date.strftime('%Y') %}
{% if this_year != prev_year %}
<div class="row-fluid archive_row">
<div class="span1 archive_year">{{ this_year }}</div>
</div>
{% endif %}
{% if this_year != prev_year or this_month != prev_month %}
<div class="row-fluid archive_row">
<div class="offset1 span1 archive_month">{{ this_month }}</div>
</div>
{% endif %}
<div class="row-fluid archive_row">
{% if this_month != prev_month or this_day != prev_day %}
<div class="offset1 span1 archive_day">
{{ this_day }}
</div>
{% endif %}
<div class="{% if this_year == prev_year and this_month == prev_month and this_day == prev_day %}offset2 {% endif %}span10">
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> <small>{{ article.category }}</small></dd>
</div>
</div>
{% set prev_year = this_year %}
{% set prev_month = this_month %}
{% set prev_day = this_day %}
{% endfor %}
</section>
</div>
{% endblock %}

View File

@ -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 %}
<div class="span10 offset1">
<section>
<article>
<header>
<h1 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
title="Permalink a {{ article.title|striptags }}">{{ article.title}}</a></h1>
</header>
<div class="entry-content">
{% include 'article_infos.html' %}
{{ article.content }}
</div>
</article>
</section>
</div>
{% endblock %}

View File

@ -0,0 +1,25 @@
<footer class="post-info">
{% if article.author %}
<address class="vcard author">
di: <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
</address>
{% endif %}
data: {{ article.date.strftime('%d %B %Y') }}
<br>
categoria: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
<br>
{% if article.tags %}
tag: {% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
{% endfor %}
{% endif %}
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
</footer>

View File

@ -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%}

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
{% block head %}
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
{% endif %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
{% endif %}
{% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %}
{% if CATEGORY_FEED_ATOM and category %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
{% endif %}
{% if CATEGORY_FEED_RSS and category %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
{% endif %}
{% if TAG_FEED_ATOM and tag %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
{% endif %}
{% if TAG_FEED_RSS and tag %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
{% endif %}
{% endblock head %}
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
{% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages %}
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
{% else %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories %}
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
{% endif %}
{% endif %}
</ul></nav><!-- /#menu -->
{% block content %}
{% endblock %}
<footer id="contentinfo" class="body">
<hr>
<address id="about" class="vcard body">
<small>
unit hacklab 2019 - Alimentato da
<a href="http://python.org">Python</a> e
<a href="http://getpelican.com/">Pelican</a>, tema
<a href="https://git.abbiamoundominio.org/dan/minimo">minimo</a>
</small>
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>
</html>

View File

@ -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 %}
<div class="span9">
<section>
<h1>{% block content_title %}Categorie {% endblock %}</h1>
<dl>
{% for category, articles in categories %}
<dd><a href="{{ SITEURL }}/{{ category.url }}">{{ category }} ({{ articles|count }})</a></dd>
{% endfor %}
</dl>
</section>
</div>
{% endblock %}

View File

@ -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%}

View File

@ -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 %}
<div class="span9">
{% if articles %}
{% for article in articles_page.object_list %}
{% if loop.length > 0 %}
{% if loop.first %}
<section>
<ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
{% endif %}
<article>
<header>
<h1 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink: {{ article.title|striptags }}">
{{ article.title }}
</a>
</h1>
</header>
<div class="entry-content">
{% include 'article_infos.html' %}
{{ article.summary }}
<p class="readmore">
<a class="btn btn-small btn-info" href="{{ SITEURL }}/{{ article.url }}">continua..</a>
</p>
</div>
<hr/>
</article>
{% if loop.last %}
</ol><!-- /#posts-list -->
{% if loop.last and (articles_page.has_previous()
or not articles_page.has_previous() and loop.length > 1) %}
{% include 'pagination.html' %}
{% endif %}
</section><!-- /#content -->
{% endif %}
{% endif %}
{% endfor %}
{% else %}
<section>
<h2>Pages</h2>
{% for page in PAGES %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</section>
{% endif %}
</div>
{% endblock content %}
{% if LINKS %}
<div>
<h2>Links</h2>
<ul>
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
</div><!-- /.Links -->
{% endif %}
{% if TAG_CLOUD_STEPS %}
<div>
<h2>Tags</h2>
<ul id="cloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}<!-- /.Tags -->
</div>

View File

@ -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 %}
<section >
<h1 class="entry-title">{{ page.title }}</h1>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{{ page.content }}
</section>
{% endblock %}

View File

@ -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%}

View File

@ -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 %}
<div class="span9">
<section>
<h1>{% block content_title %}Tags{% endblock %}</h1>
<dl>
{% for tag, articles in tags|sort %}
<dd><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} ({{ articles|count }})</a></dd>
{% endfor %}
</dl>
</section>
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% macro translations_for(article) %}
{% if article.translations %}
<br>
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
{% endmacro %}