mirror of
https://github.com/offen/website.git
synced 2024-11-25 18:20:28 +01:00
use pelican articles for modelling blog logic
This commit is contained in:
parent
ffd299a26b
commit
f8c98060e4
@ -1,7 +1,7 @@
|
||||
title: Laying the foundation for fair web analytics | Offen
|
||||
description: Our milestone 1 achievements include extensible architecture, a localization option and an improved server structure.
|
||||
save_as: blog/laying-foundation-for-fair-web-analytics/index.html
|
||||
href: /blog/laying-foundation-for-fair-web-analytics/
|
||||
date: 2019-12-12
|
||||
slug: laying-foundation-for-fair-web-analytics
|
||||
sitemap_priority: 0.7
|
||||
sm_image_url: /theme/images/offen-blog-0010-milestone1.jpg
|
||||
|
@ -18,6 +18,7 @@ TRANSLATION_FEED_ATOM = None
|
||||
AUTHOR_FEED_ATOM = None
|
||||
AUTHOR_FEED_RSS = None
|
||||
|
||||
|
||||
SITEURL = 'http://localhost:8000'
|
||||
|
||||
# pagination
|
||||
@ -29,15 +30,20 @@ THEME = './theme'
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
# dont create following standard pages
|
||||
AUTHORS_SAVE_AS = None
|
||||
ARCHIVES_SAVE_AS = None
|
||||
CATEGORIES_SAVE_AS = None
|
||||
TAGS_SAVE_AS = None
|
||||
AUTHOR_SAVE_AS = ''
|
||||
AUTHORS_SAVE_AS = ''
|
||||
ARCHIVE_SAVE_AS = ''
|
||||
ARCHIVES_SAVE_AS = ''
|
||||
CATEGORY_SAVE_AS = ''
|
||||
CATEGORIES_SAVE_AS = ''
|
||||
TAG_SAVE_AS = ''
|
||||
TAGS_SAVE_AS = ''
|
||||
|
||||
# keep this for access to page variable
|
||||
DIRECT_TEMPLATES = ['sitemap']
|
||||
SITEMAP_SAVE_AS = 'sitemap.xml'
|
||||
PAGE_SAVE_AS = '{slug}/index.html'
|
||||
ARTICLE_SAVE_AS = 'blog/{slug}/index.html'
|
||||
|
||||
PLUGIN_PATHS = ['./plugins']
|
||||
PLUGINS = ['decorate_content', 'assets']
|
||||
|
@ -11,7 +11,6 @@ SITEURL = os.environ.get('SITEURL', 'https://www.offen.dev')
|
||||
# RELATIVE_URLS = True
|
||||
|
||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
|
2
homepage/theme/templates/article.html
Normal file
2
homepage/theme/templates/article.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "base.html" %}
|
||||
{% set page = article %}
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{% block head %}
|
||||
<head>
|
||||
<title>
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
@ -26,6 +27,7 @@
|
||||
<script async src="/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
|
||||
{% endif %}
|
||||
</head>
|
||||
{% endblock %}
|
||||
<body class="{{ page.template }}">
|
||||
<div class="menu">
|
||||
<section class="nav-bar">
|
||||
|
@ -8,4 +8,12 @@
|
||||
</url>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for article in articles %}
|
||||
{% if not article.exclude_from_sitemap %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ article.save_as | replace('index.html', '') }}</loc>
|
||||
<priority>{{ article.sitemap_priority or 0.5 }}</priority>
|
||||
</url>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</urlset>
|
||||
|
Loading…
Reference in New Issue
Block a user