2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 09:00:28 +01:00

add feed page, link to newest article via status

This commit is contained in:
Frederik Ring 2019-12-13 12:24:58 +01:00
parent f8c98060e4
commit 1b67f824b9
6 changed files with 52 additions and 21 deletions

View File

@ -18,7 +18,6 @@ TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
SITEURL = 'http://localhost:8000'
# pagination
@ -29,18 +28,17 @@ THEME = './theme'
# Delete the output directory before generating new files.
DELETE_OUTPUT_DIRECTORY = True
DIRECT_TEMPLATES = ['sitemap', 'archives']
# dont create following standard pages
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']
ARCHIVES_SAVE_AS = 'blog/index.html'
SITEMAP_SAVE_AS = 'sitemap.xml'
PAGE_SAVE_AS = '{slug}/index.html'
ARTICLE_SAVE_AS = 'blog/{slug}/index.html'
@ -61,5 +59,3 @@ LINKEDIN_URL = 'https://www.linkedin.com/company/hioffen'
TWITTER_URL = 'https://twitter.com/hioffen'
OFFEN_ACCOUNT_ID = '9b63c4d8-65c0-438c-9d30-cc4b01173393'
STATUS_URL = '/blog/laying-foundation-for-fair-web-analytics'

View File

@ -0,0 +1,20 @@
{% extends "base.html" %}
{% set title = 'Feed' %}
{% set description = 'Description' %}
{% set href = 'blog/' %}
{% set no_stats = False %}
{% set template = 'archives' %}
{% block content %}
{% for article in articles %}
{% if loop.index != 1 %}
<hr>
{% endif %}
<div class="content">
<div class="container-reader">
{{ article.content }}
</div>
</div>
{% endfor %}
{% endblock %}

View File

@ -1,2 +1,9 @@
{% extends "base.html" %}
{% set page = article %}
{% set title = article.title %}
{% set description = article.description %}
{% set href = article.save_as.replace('index.html', '') %}
{% set sm_image_url = article.sm_image_url %}
{% set no_stats = article.no_stats %}
{% set template = article.template %}
{% set content = article.content %}

View File

@ -3,32 +3,32 @@
{% block head %}
<head>
<title>
{% block title %}{{ page.title }}{% endblock %}
{% block title %}{{ title }}{% endblock %}
</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{ page.description }}">
<meta name="description" content="{{ description }}">
<meta property="og:site_name" content="{{ SITENAME }}">
<meta property="og:locale" content="{{ DEFAULT_LANG }}">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:description" content="{{ page.description }}">
<meta property="og:title" content="{{ title }}">
<meta property="og:description" content="{{ description }}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ SITEURL }}/{{ page.save_as | replace('index.html', '') }}">
<meta property="og:image" content="{{ SITEURL }}{{ page.sm_image_url }}">
<meta property="og:url" content="{{ SITEURL }}/{{ href }}">
<meta property="og:image" content="{{ SITEURL }}{{ sm_image_url or '/theme/images/offen-logo-social-media.jpg' }}">
<meta name="twitter:image:alt" content="Offen logo">
<meta name="twitter:card" content="summary_large_image">
<link rel="canonical" href="{{ SITEURL }}/{{ page.save_as | replace('index.html', '') }}">
<link rel="canonical" href="{{ SITEURL }}/{{ href }}">
<link rel="shortcut icon" type="image/x-icon" href="/theme/images/favicon.ico">
{% assets filters="libsass,postcss,cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.scss" %}
<link rel="stylesheet" href="/{{ ASSET_URL }}">
{% endassets %}
{% if OFFEN_ACCOUNT_ID and not page.no_stats %}
{% if OFFEN_ACCOUNT_ID and not no_stats %}
<script async src="/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
{% endif %}
</head>
{% endblock %}
<body class="{{ page.template }}">
<body class="{{ template }}">
<div class="menu">
<section class="nav-bar">
<div class="nav-container">
@ -45,7 +45,7 @@
<a href="/deep-dive/">Deep dive</a>
</li>
<li>
<a href="{{ STATUS_URL }}">Status</a>
<a href="/blog/{{ articles[0].slug }}/">Status</a>
</li>
<li>
<a href="/about/">About</a>
@ -65,7 +65,7 @@
{% block content %}
<div class="content">
<div class="container-reader">
{{ page.content }}
{{ content }}
</div>
</div>
{% endblock %}
@ -94,7 +94,7 @@
Offen is still in alpha. Discover what is already up and running and where we want to go in the coming months.
</p>
<div class="btn-wrapper">
<a class="btn btn-color-black" href="{{ STATUS_URL }}">Project status</a>
<a class="btn btn-color-black" href="/blog/{{ articles[0].slug }}/">Project status</a>
</div>
</div>
<div class="card">

View File

@ -67,7 +67,7 @@
Offen is still in alpha. Discover what is already up and running and where we want to go in the coming months.
</p>
<div class="btn-wrapper">
<a class="btn btn-color-white" href="{{ STATUS_URL }}">Project status</a>
<a class="btn btn-color-white" href="/blog/{{ articles[0].slug }}/">Project status</a>
</div>
</div>
</div>

View File

@ -1 +1,9 @@
{% extends "base.html" %}
{% set title = page.title %}
{% set description = page.description %}
{% set href = page.save_as.replace('index.html', '') %}
{% set sm_image_url = page.sm_image_url %}
{% set no_stats = page.no_stats %}
{% set template = page.template %}
{% set content = page.content %}