Browse Source

prepare first blog article

products
Nico Schottelius 3 years ago
parent
commit
a7ec6f0d03
  1. 7
      content/contents.lr
  2. 2
      content/u/blog/contents.lr
  3. 9
      content/u/blog/first-post/contents.lr
  4. 46
      content/u/blog/how-to-sneak-in-a-static-cms/contents.lr
  5. 10
      content/u/contents.lr
  6. 2
      models/blog.ini
  7. 6
      templates/layout.html
  8. 2
      ungleich-staticcms.lektorproject

7
content/contents.lr

@ -1,3 +1,6 @@
title: ungleich static cms
title: ungleich cms
---
body: There is not much - everything is stored below /u/
body: There is not much here - everything is stored below /u/.
You should actually not be able to see this page below ungleich.ch. If
you do, please let us know.

2
content/u/blog/contents.lr

@ -1,3 +1,3 @@
_model: blog
---
title: Blog
title: the new ungleich blog

9
content/u/blog/first-post/contents.lr

@ -1,9 +0,0 @@
title: Hello Website
---
pub_date: 2019-09-24
---
author: ungleich
---
body:
This is an example blog post. Not much here but that's not the point :)

46
content/u/blog/how-to-sneak-in-a-static-cms/contents.lr

@ -0,0 +1,46 @@
title: How to sneak in a static CMS
---
pub_date: 2019-09-24
---
author: Nico Schottelius
---
body:
## Introduction
To put you in the right mood for reading this article, I ask you
take some assumptions for reading this article:
Assume you are the CEO of a small IPv6, Linux and FOSS company. Assume
that some years ago you made the decision to use
[Django CMS Blog](https://github.com/nephila/djangocms-blog) for the
blog to support non-technical staff to post blog articles.
Also, for the sake of completeness, assume that you are still running
your own [private blog](https://www.nico.schottelius.org) with
[ikiwiki](http://ikiwiki.info).
## Motivation
I believe that before changing anything
([especially in IT](https://en.wikipedia.org/wiki/Not_invented_here)),
you should have a good reason for changing. So what could be
the reason for sneaking in a static CMS? The answer is relatively
easy:
* Reducing latency
* Reducing latency
* Reducing the inhibition threshold for writing blog articles
Let's have a look at each of the points in detail,
[before letting us convince
ourselves...](https://en.wikipedia.org/wiki/Not_invented_here).
### Reducing latency
One of the biggest problems for me is to wait for an web application
to *save* something. With Django CMS Blog, you have the standard
**write - save - publish flow**. So when I want to see the result, I
have to wait seconds. Depending on my distance to our blog this might
take 1 second (Europe) or about 5 seconds (South Korea). While this
does not sound like much, it **feels** very long.

10
content/u/contents.lr

@ -1,3 +1,9 @@
title: /u/: the home of ungleich
title: /u/: the new home of ungleich
---
body: This might be the new index page of ungleich.ch
body: We are changing our CMS and our blog to a static
system based on [lektor](https://www.getlektor.com).
Checkout the **source
code** on [code.ungleich.ch](https://code.ungleich.ch/ungleich-public/ungleich-staticcms).
Eventually, we might move all content from
[ungleich.ch](https://ungleich.ch) into this CMS.

2
models/blog.ini

@ -13,4 +13,4 @@ order_by = -pub_date, title
[pagination]
enabled = yes
per_page = 10
per_page = 4

6
templates/layout.html

@ -1,18 +1,16 @@
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="{{ '/u/static/style.css'|url }}">
<title>{% block title %}Welcome{% endblock %} — ungleich static cms</title>
<title>{% block title %}Welcome to {% endblock %} ungleich.ch</title>
<body>
<header>
<h1>ungleich static cms</h1>
<h1>{{ self.title() }}</h1>
<nav>
<ul class="nav navbar-nav">
<li{% if this._path == '/' %} class="active"{% endif
%}><a href="{{ '/'|url }}">Welcome</a></li>
{% for href, title in [
['/u/blog', 'Blog'],
['/u/projects', 'Projects'],
['/u/about', 'About']
] %}
<li{% if this.is_child_of(href) %} class="active"{% endif
%}><a href="{{ href|url }}">{{ title }}</a></li>

2
ungleich-staticcms.lektorproject

@ -1,2 +1,2 @@
[project]
name = ungleich static cms
name = ungleich: IPv6 - Linux - FOSS

Loading…
Cancel
Save