From a4e35942fee745e64db5d0099ba2582e0fb4417e Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 18 Jun 2026 17:57:51 +0200 Subject: Build the first usable version of the blog This adds the Lektor project structure, models, templates, styling, feeds, categories, tags, archives, custom Markdown heading handling, and the initial content needed to make the blog usable. --- configs/atom.ini | 18 ++++++++++++++++++ configs/index-pages.ini | 23 +++++++++++++++++++++++ configs/tags.ini | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 configs/atom.ini create mode 100644 configs/index-pages.ini create mode 100644 configs/tags.ini (limited to 'configs') diff --git a/configs/atom.ini b/configs/atom.ini new file mode 100644 index 0000000..84b78ec --- /dev/null +++ b/configs/atom.ini @@ -0,0 +1,18 @@ +[latest] +name = Still Thinking About It — Latest posts +source_path = /blog +url_path = /blog/latest.xml +item_model = blog-post +item_date_field = publication_date +blog_author_field = author +item_author_field = author + +[all] +name = Still Thinking About It — All posts +source_path = /blog +url_path = /blog/all.xml +item_model = blog-post +item_date_field = publication_date +blog_author_field = author +item_author_field = author +limit = 0 diff --git a/configs/index-pages.ini b/configs/index-pages.ini new file mode 100644 index 0000000..bc428ce --- /dev/null +++ b/configs/index-pages.ini @@ -0,0 +1,23 @@ +[year] +parent_path = /blog +key = '{.year:04d}'.format(item.publication_date) +template = blog-year-index.html +subindex = month + +[year.fields] +date = this.children.first().publication_date.replace(month=1, day=1) +year = this.key|int +previous_year_page = site.get('/blog@index-pages/year/{:04d}'.format((this.key|int) - 1)) +next_year_page = site.get('/blog@index-pages/year/{:04d}'.format((this.key|int) + 1)) +first_year_page = index_pages('year')|sort(attribute='year')|first +last_year_page = index_pages('year')|sort(attribute='year')|last + +[year.month] +key = '{.month:02d}'.format(item.publication_date) +template = blog-month-index.html + +[year.month.fields] +# this.parent is the year-index page this month-index belongs to. +date = this.parent.date.replace(month=this.key|int) +year = this.parent.year +month = this.key|int diff --git a/configs/tags.ini b/configs/tags.ini new file mode 100644 index 0000000..3ecc49a --- /dev/null +++ b/configs/tags.ini @@ -0,0 +1,4 @@ +parent = /blog +items = this.parent.children.filter(F.tags.contains(tag)).order_by('-publication_date') +template = tag.html +url_path = {{ this.parent.url_path }}tag/{{ tag|trim|lower|replace(" ", "-") }} -- cgit v1.3.1