From a7ec6f0d0389ea8b6fc433febf864aacde039389 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 24 Sep 2019 23:35:06 +0900 Subject: [PATCH] prepare first blog article --- content/contents.lr | 7 ++- content/u/blog/contents.lr | 2 +- content/u/blog/first-post/contents.lr | 9 ---- .../how-to-sneak-in-a-static-cms/contents.lr | 46 +++++++++++++++++++ content/u/contents.lr | 10 +++- models/blog.ini | 2 +- templates/layout.html | 6 +-- ungleich-staticcms.lektorproject | 2 +- 8 files changed, 64 insertions(+), 20 deletions(-) delete mode 100644 content/u/blog/first-post/contents.lr create mode 100644 content/u/blog/how-to-sneak-in-a-static-cms/contents.lr diff --git a/content/contents.lr b/content/contents.lr index bf3e7fb..b74f174 100644 --- a/content/contents.lr +++ b/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. diff --git a/content/u/blog/contents.lr b/content/u/blog/contents.lr index 56be89d..65524b1 100644 --- a/content/u/blog/contents.lr +++ b/content/u/blog/contents.lr @@ -1,3 +1,3 @@ _model: blog --- -title: Blog +title: the new ungleich blog diff --git a/content/u/blog/first-post/contents.lr b/content/u/blog/first-post/contents.lr deleted file mode 100644 index 73b6eef..0000000 --- a/content/u/blog/first-post/contents.lr +++ /dev/null @@ -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 :) diff --git a/content/u/blog/how-to-sneak-in-a-static-cms/contents.lr b/content/u/blog/how-to-sneak-in-a-static-cms/contents.lr new file mode 100644 index 0000000..fb05da1 --- /dev/null +++ b/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. diff --git a/content/u/contents.lr b/content/u/contents.lr index b29a640..ce54b67 100644 --- a/content/u/contents.lr +++ b/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. diff --git a/models/blog.ini b/models/blog.ini index 0a3a3ca..58fd9dd 100644 --- a/models/blog.ini +++ b/models/blog.ini @@ -13,4 +13,4 @@ order_by = -pub_date, title [pagination] enabled = yes -per_page = 10 +per_page = 4 \ No newline at end of file diff --git a/templates/layout.html b/templates/layout.html index 9060ae4..eff06a1 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,18 +1,16 @@ -{% block title %}Welcome{% endblock %} — ungleich static cms +{% block title %}Welcome to {% endblock %} ungleich.ch
-

ungleich static cms

+

{{ self.title() }}