Compare commits

...

5 Commits

58 changed files with 493 additions and 219 deletions

View File

@@ -2,6 +2,7 @@
title: "{{ replace (replaceRE "^[0-9]{4}-[0-9]{2}-" "" .Name) "-" " " | title }}"
date: {{ now.Format "2006-01-02" }}
categories:
- blog
- english
- deutsch
tags:

View File

@@ -75,3 +75,9 @@ style = "emacs"
[privacy.youtube]
disable = false
privacyEnhanced = true
# Modules
[[module.mounts]]
# Make static images available as image assets by default
source = "static/img/"
target = "assets/images/"

View File

@@ -3,6 +3,7 @@ title: Organising micro task emails in Thunderbird
date: 2013-10-27T23:12:55+00:00
aliases: organising-micro-task-emails-in-thunderbird
categories:
- blog
- english
tags:
- email

View File

@@ -3,6 +3,7 @@ title: Mounting a SFTP storage in GNU/Linux
date: 2014-01-13T14:42:01+00:00
aliases: /blog/2014/mounting-a-sftp-storage-in-gnu-linux
categories:
- blog
- english
tags:
- bash

View File

@@ -3,6 +3,7 @@ title: Why free choice of routers is a must
date: 2014-01-14T17:47:43+00:00
aliases: why-free-choice-of-routers-is-an-unnegotiable-must
categories:
- blog
- english
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: 'I love ZNC because #ilovefs'
date: 2014-02-14T05:00:14+00:00
url: /blog/2014/i-love-znc-because-ilovefs
categories:
- blog
- english
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Wirklich sichere WhatsApp Alternativen
date: 2014-02-21T09:41:54+00:00
aliases: wirklich-sichere-whatsapp-alternativen
categories:
- blog
- deutsch
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Guter E-Mail-Stil
date: 2014-05-19T12:56:12+00:00
aliases: guter-e-mail-stil
categories:
- blog
- deutsch
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Birthday Calendar with ownCloud via CalDAV
date: 2014-09-17T22:56:46+00:00
aliases: birthday-calendar-with-owncloud-via-caldav
categories:
- blog
- english
tags:
- email

View File

@@ -3,6 +3,7 @@ title: Setting Openstreetmap as default in Thunderbirds contacts
date: 2014-09-28T10:40:42+00:00
aliases: setting-openstreetmap-as-default-in-thunderbird-contacts
categories:
- blog
- english
tags:
- email

View File

@@ -3,6 +3,7 @@ title: My internship at FSFE
date: 2014-10-24T10:39:54+00:00
aliases: my-internship-at-fsfe
categories:
- blog
- english
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: Freie Kommunikation ist die Essenz des Menschseins
date: 2014-11-10T13:15:19+00:00
aliases: freie-kommunikation-ist-essenz-des-lebens
categories:
- blog
- deutsch
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Sharing is caring my Git instance
date: 2014-11-28T17:16:50+00:00
aliases: sharing-is-caring-my-git-instance
categories:
- blog
- english
tags:
- server

View File

@@ -5,6 +5,7 @@ aliases:
- next-station-tanzania
- naechste-station-tansania
categories:
- blog
- english
tags:
- tanzania

View File

@@ -3,6 +3,7 @@ title: Yourls URL Shortener for Turpial
date: 2015-01-24T01:58:32+00:00
aliases: yourls-url-shortener-for-turpial
categories:
- blog
- english
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: I love Taskwarrior, therefore I love Free Software
date: 2015-02-14T12:05:42+00:00
aliases: i-love-taskwarrior-therefore-i-love-free-software
categories:
- blog
- english
tags:
- bash

View File

@@ -3,6 +3,7 @@ title: In The End Freedom Is What Matters
date: 2015-02-25T02:03:04+00:00
aliases: in-the-end-freedom-is-what-matters
categories:
- blog
- english
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: Erste Eindrücke aus Tansania
date: 2015-04-14T08:05:07+00:00
aliases: erste-eindruecke-aus-tansania
categories:
- blog
- deutsch
tags:
- tanzania

View File

@@ -3,12 +3,14 @@ title: 'Nächster Halt: Endstation.'
date: 2015-05-20T08:04:10+00:00
aliases: naechster-halt-endstation
categories:
- blog
- deutsch
tags:
- germany
- policy
- tanzania
headerimage: /blog/weselsky-putin.jpg
headerimage:
src: /blog/weselsky-putin.jpg
---

View File

@@ -3,6 +3,7 @@ title: Technology and Free Software in Tanzania
date: 2015-05-08T07:34:19+00:00
aliases: technology-and-free-software-in-tz
categories:
- blog
- english
tags:
- tanzania

View File

@@ -3,6 +3,7 @@ title: splitDL Downloading huge files from slow and unstable internet connec
date: 2015-06-26T15:59:03+00:00
aliases: splitdl-downloading-huge-files-from-slow-and-unstable-internet-connections
categories:
- blog
- english
tags:
- bash

View File

@@ -3,6 +3,7 @@ title: Weiterer Teilerfolg beim Routerzwang
date: 2015-07-22T06:48:01+00:00
aliases: weiterer-teilerfolg-beim-routerzwang
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: German Government wants authorities to advertise PDFreaders
date: 2015-09-19T17:27:20+00:00
aliases: german-government-wants-authorities-to-advertise-pdfreaders
categories:
- blog
- english
tags:
- fsfe

View File

@@ -3,6 +3,7 @@ title: I love Free Software (Apps)
date: 2016-02-14T09:00:18+00:00
aliases: i-love-free-software-apps
categories:
- blog
- english
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Switching my code from gitweb to Gogs
date: 2016-02-26T17:05:18+00:00
aliases: switching-my-code-from-gitweb-to-gogs
categories:
- blog
- english
tags:
- tools

View File

@@ -3,6 +3,7 @@ title: 'Getting oldschool, oder: Wie ich uncool wurde'
date: 2016-03-28T13:39:45+00:00
aliases: getting-oldschool-oder-wie-ich-uncool-wurde
categories:
- blog
- deutsch
tags:
- chat

View File

@@ -3,6 +3,7 @@ title: Der Routerzwang fällt Und was bringt mir das?
date: 2016-07-30T11:02:38+00:00
aliases: der-routerzwang-faellt-was-bringt-mir-das
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: Erste Testgeräte für Routerfreiheit versendet
date: 2016-08-08T09:11:51+00:00
aliases: erste-testgeraete-fuer-routerfreiheit-versendet
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: FrOSCon 2016 Ein Rückblick
date: 2016-08-26T13:57:48+00:00
aliases: froscon-2016-ein-rueckblick
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: Endgerätefreiheit testen Es sind wieder Router verfügbar!
date: 2016-09-23T09:23:09+00:00
aliases: endgeraetefreiheit-testen-es-sind-wieder-router-verfuegbar
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: „Schluss mit dem Routerzwang“ Radiosendung im Deutschlandfunk
date: 2016-09-01T16:44:26+00:00
aliases: schluss-mit-dem-routerzwang-radiosendung-im-deutschlandfunk
categories:
- blog
- deutsch
tags:
- routerfreedom

View File

@@ -3,6 +3,7 @@ title: Freie Software Definition in Dortmund
date: 2016-10-13T17:22:16+00:00
aliases: freie-software-definition-in-dortmund
categories:
- blog
- deutsch
tags:
- fsfe

View File

@@ -3,6 +3,7 @@ title: Build FSFE websites locally
date: 2016-11-13T23:00:44+00:00
aliases: build-fsfe-websites-locally
categories:
- blog
- english
tags:
- bash

View File

@@ -3,6 +3,7 @@ title: OpenRheinRuhr 2016 A report of iron and freedom
date: 2016-11-09T21:55:53+00:00
aliases: openrheinruhr-2016-a-report-of-iron-and-freedom
categories:
- blog
- english
tags:
- report

View File

@@ -5,6 +5,7 @@ type: post
date: 2017-02-14T07:30:51+00:00
url: /blog/2017/i-love-astroid-ilovefs
categories:
- blog
- english
tags:
- email

View File

@@ -3,11 +3,13 @@ title: 'Idee: Wiki zu gesellschaftspolitischen Positionen von Prominenten'
date: 2017-05-29T10:15:45+00:00
aliases: idee-wiki-zu-gesellschaftspolitischen-positionen-von-prominenten
categories:
- blog
- deutsch
tags:
- policy
headerimage: /blog/maiziere-lehmann.jpg
headercredits: CC-BY-SA 3.0 Sandro Halank / CC-BY 2.0 Ronnie Macdonald
headerimage:
src: /blog/maiziere-lehmann.jpg
text: CC-BY-SA 3.0 Sandro Halank / CC-BY 2.0 Ronnie Macdonald
---
_Alles begann, als mein Mitbewohner Lars und ich uns eines morgens fragten: „Mit wem würden wir lieber ein Bier trinken gehen, Thomas de Maizière oder Jens Lehmann?“._

View File

@@ -3,6 +3,7 @@ title: FSFE Planet has been refurbished
date: 2019-02-11T10:33:11+00:00
aliases: fsfe-planet-has-been-refurbished
categories:
- blog
- english
tags:
- fsfe

View File

@@ -3,6 +3,7 @@ title: 'Protect freedom on radio devices: raise your voice today!'
date: 2019-03-01T15:09:56+00:00
aliases: protect-freedom-on-radio-devices-raise-your-voice-today
categories:
- blog
- english
tags:
- fsfe

View File

@@ -2,13 +2,15 @@
title: The 3rd FSFE System Hackers hackathon
date: 2019-10-22
categories:
- blog
- english
tags:
- fsfe
- report
- server
headerimage: /blog/system-chaos.jpg
headercredits: Fortunately not how the FSFE's infrastructure looks like
headerimage:
src: /blog/system-chaos.jpg
text: Fortunately not how the FSFE's infrastructure looks like
---

View File

@@ -2,13 +2,15 @@
title: I love the hidden champions
date: 2020-02-14
categories:
- blog
- english
tags:
- ilovefs
- fsfe
- bash
headerimage: /blog/hidden-street.jpg
headercredits: The unknown Free Software contributors. Photo by Kaique Rocha
headerimage:
src: /blog/hidden-street.jpg
text: The unknown Free Software contributors. Photo by Kaique Rocha
---

View File

@@ -2,13 +2,15 @@
title: System Hackers meeting - Lyon edition
date: 2020-03-31
categories:
- blog
- english
tags:
- fsfe
- report
- server
headerimage: /blog/syshackers-group-hacking.jpg
headercredits: Hackers in their natural working environment. For the picture we took off the black ski masks and gloves.
headerimage:
src: /blog/syshackers-group-hacking.jpg
text: Hackers in their natural working environment. For the picture we took off the black ski masks and gloves.
---

View File

@@ -2,13 +2,15 @@
title: "The power of git-sed"
date: 2020-07-28
categories:
- blog
- english
tags:
- tools
- bash
- fsfe
headerimage: /blog/git-sed.png
headercredits: Replacing content in thousands of files? No problem!
headerimage:
src: /blog/git-sed.png
text: Replacing content in thousands of files? No problem!
---
In the recent weeks and months, the [FSFE Web Team](https://fsfe.org/contribute/web/) has been doing some heavy work on the [FSFE website](https://fsfe.org). We moved and replaced thousands of files and their respective links to improve the structure of a historically grown website (19+ years, 23243 files, almost 39k commits). But how to do that most efficiently in a version controlled system like Git?

View File

@@ -2,14 +2,16 @@
title: "Docker2Caddy - An automatic Reverse Proxy for Docker containers"
date: 2022-04-25
categories:
- blog
- english
tags:
- tools
- fsfe
- server
- python
headerimage: /blog/docker.jpg
headercredits: Shipping a load of containers requires a reliable infrastructure
headerimage:
src: /blog/docker.jpg
text: Shipping a load of containers requires a reliable infrastructure
---
So you have a number of Docker containers running web services which you would

View File

@@ -2,13 +2,15 @@
title: "Seafile Mirror - Simple automatic backup of your Seafile libraries"
date: 2023-09-22
categories:
- blog
- english
tags:
- python
- server
- tools
headerimage: /blog/library.jpg
headercredits: Wouldn't it be a shame if your library were to be destroyed?
headerimage:
src: /blog/library.jpg
text: Wouldn't it be a shame if your library were to be destroyed?
---
I have been using [Seafile](https://www.seafile.com/) for years to host and

View File

@@ -0,0 +1,20 @@
---
title: "The Growing Importance of Software Bills of Materials (SBOM)"
date: 2023-11-15
categories:
- english
- podcast
tags:
- SupplyChain
- OSPO
- Security
headerimage:
src: /blog/file-cabinet.jpg
text: Neatly organise your records
audio: https://podcast.opensap.info/open-source-way/2023/11/29/the-growing-importance-of-software-bills-of-materials-sbom/
podcast:
name: SAP's Open Source Way Podcast
href: https://podcast.opensap.info/open-source-way/2023/11/29/the-growing-importance-of-software-bills-of-materials-sbom/
---
I had the pleasure to moderate the OpenRail Day 2025 in Paris, organised by the [OpenRail Association](https://openrailassociation.org) to share knowledge and experiences about open source software in the railway industry. The event featured several talks and panel discussions with experts from different companies and organisations involved in open source projects related to railways.

View File

@@ -2,12 +2,14 @@
title: "INWX DNS Recordmaster - Manage your DNS nameserver records via files in Git"
date: 2024-11-07
categories:
- blog
- english
tags:
- python
- tools
headerimage: /blog/file-cabinet.jpg
headercredits: Neatly organise your records
headerimage:
src: /blog/file-cabinet.jpg
text: Neatly organise your records
---
I own and manage 30+ domains at [INWX](https://www.inwx.com/), a large and professional domain registrar. Although INWX has a somewhat decent web interface, it became a burden for me to keep an overview of each domain's sometimes dozens of records. Especially when e.g. changing an IP address for more than one domain, it caused multiple error-prone clicks and copy/pastes that couldn't be reverted in the worst case. This is why I created [**INWX DNS Recordmaster**](https://github.com/mxmehl/inwx-dns-recordmaster) which I will shortly present here.

View File

@@ -0,0 +1,51 @@
---
title: "The burden of knowledge: dealing with open-source risks"
date: 2025-03-10
categories:
- english
- article
tags:
- OSPO
- Community
- SupplyChain
- Security
headerimage:
src: /blog/file-cabinet.jpg
text: Neatly organise your records
article:
name: LWN.net
href: https://lwn.net/SubscriberLink/1013614/b3743b7875dc41ae/
---
I own and manage 30+ domains at [INWX](https://www.inwx.com/), a large and professional domain registrar. Although INWX has a somewhat decent web interface, it became a burden for me to keep an overview of each domain's sometimes dozens of records. Especially when e.g. changing an IP address for more than one domain, it caused multiple error-prone clicks and copy/pastes that couldn't be reverted in the worst case. This is why I created [**INWX DNS Recordmaster**](https://github.com/mxmehl/inwx-dns-recordmaster) which I will shortly present here.
If you are an INWX customer, you can use this tool to manage all your DNS records in YAML files. Ideally, you will store these files in a Git repository which you can use to track changes and roll back in case of a mistake. Having one file per domain provides you a number of further advantages:
* You can easily copy/paste records from other domains, e.g. for `SPF`, `DKIM` or `NS` records
* Overall search/replace of certain values becomes much easier, e.g. of IP addresses
* You can prepare larger changes offline and can synchronise once you feel it's done
INWX DNS Recordmaster takes care of making the required changes of the live records so that it matches the local state. This is done via the INWX API, ensuring that the amount of API calls is minimal.
This even allows you to set up a pipeline that takes care of the synchronisation[^1].
## Wait, there is more
As written above, I already had a large stack of domains that I previously managed via the web interface. This is why some additional convenience features found their way into the tool.
* You can convert all records of an existing and already configured domain at INWX into the file format. This made onboarding my 30+ domains a matter of a few minutes.
* On a global or per-domain level, you can ignore certain record types. For example, if you don't want to touch any `NS` records, you can configure that. By default, `SOA` records are ignored. You may even ignore all live records that don't exist in your local configuration.
* Of course, you can make a dry run to see which effects your configuration will have in practice.
Did I miss something to make it more productive for you? Let me know!
## Install, use, contribute
You are welcome to [install this tool](https://github.com/mxmehl/inwx-dns-recordmaster?tab=readme-ov-file#install), it's Free and Open Source Software after all. All you need is Python installed.
One of the tool's users is the [OpenRail Association](https://openrailassociation.org) which manages some of its domains with this program and [published its configuration](https://github.com/OpenRailAssociation/openrail-dns). This is a prime example of how organisation can make the management of records transparent and easy to change at least internally, if not even externally.
While the tool is not perfect, it already is a huge gain for efficiency and stability of my IT operations, and it already proves its capabilities for other users. To reach the remaining 20% to perfection (that will take 80% of the time, as always), you are most welcome to add issues with enhancement proposals, and if possible, also pull requests.
[^1]: For example, see the [workflow file of the OpenRail Association](https://github.com/OpenRailAssociation/openrail-dns/blob/main/.github/workflows/sync-records.yaml).

View File

@@ -0,0 +1,20 @@
---
title: "OpenRail Day 2025 Moderation"
date: 2025-12-17
categories:
- english
- presentation
tags:
- OpenRail
- OSPO
- Community
headerimage:
src: openrailday-stage.jpg
text: My amazing co-moderator Kira Correll and I on stage
video: https://clip.place/w/p/gZ1HFxLxHri8mDABzqpGHC
event:
name: OpenRail Day 2025 @ Paris
href: https://day.openrailassociation.org
---
I had the pleasure to moderate the OpenRail Day 2025 in Paris, organised by the [OpenRail Association](https://openrailassociation.org) to share knowledge and experiences about open source software in the railway industry. The event featured several talks and panel discussions with experts from different companies and organisations involved in open source projects related to railways.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

3
content/blog/_index.md Normal file
View File

@@ -0,0 +1,3 @@
---
title: Blog
---

View File

@@ -336,6 +336,10 @@ pre code {
}
}
h4 span {
cursor: default;
}
h1,
h4 a {
color: var(--primary-color-dark);

View File

@@ -20,20 +20,35 @@
<div class="metadata-page">
<div class="row vertical-align">
<div class="col-xs-3 col-md-2 text-right">
<em>Languages:</em>
<em>Type:</em>
</div>
<div class="col-xs-9 col-md-10">
<a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
{{- range $name, $taxonomy := .Site.Taxonomies.categories }}
{{- if in (slice "english" "deutsch") $name }}{{ continue }}{{ end }}
<a class="label label-success {{if eq $name $.Title}}active{{end}}" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">
{{- humanize $name -}}
</a>
{{- end -}}
{{- end }}
</div>
</div>
<div class="row vertical-align">
<div class="col-xs-3 col-md-2 text-right">
<em>Tags:</em>
<em>Language:</em>
</div>
<div class="col-xs-9 col-md-10">
<a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
{{- range $name, $taxonomy := .Site.Taxonomies.categories }}
{{- if not (in (slice "english" "deutsch") $name) }}{{ continue }}{{ end }}
<a class="label label-success {{if eq $name $.Title}}active{{end}}" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">
{{- humanize $name -}}
</a>
{{- end }}
</div>
</div>
<div class="row">
<div class="col-xs-3 col-md-2 text-right">
<em>Tag:</em>
</div>
<div class="col-xs-9 col-md-10">
<a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
@@ -62,8 +77,14 @@
<div class="blogpost">
{{ range .Paginator.Pages.ByPublishDate.Reverse }}
<div class="blog-summary">
<h4><strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong></h4>
<div class="metadata-summary">Posted on {{ .Date.Format "2 January 2006" }} - Tagged with {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}<a href="/tags/{{ lower $tag }}">{{ $tag }}</a>{{ end }}</div>
<h4>
{{ partial "blog/pre-headline.html" . -}}
<strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong>
</h4>
<div class="metadata-summary">
{{- partial "blog/verb.html" . }}
on {{ .Date.Format "2 January 2006" }} - Tagged with {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}<a href="/tags/{{ lower $tag }}">{{ $tag }}</a>{{ end }}
</div>
{{ .Summary }} <a class="learn-more" href="{{ .RelPermalink }}"></a>
</div>
{{ end }}

View File

@@ -17,14 +17,25 @@
{{ .Date.Format "2 January 2006" }}
</div>
</div>
<div class="row vertical-align">
<div class="col-xs-3 col-md-2 text-right">
<em>Type:</em>
</div>
<div class="col-xs-9 col-md-10">
{{- range .Params.categories }}
{{- if in (slice "english" "deutsch") . }}{{ continue }}{{ end }}
<a class="label label-success" href="/categories/{{ lower . }}">{{ title . }}</a>
{{- end }}
</div>
</div>
<div class="row vertical-align">
<div class="col-xs-3 col-md-2 text-right">
<em>Tags:</em>
</div>
<div class="col-xs-9 col-md-10">
{{ range .Params.tags }}
<a class="label label-success" href="/tags/{{ lower . }}">{{ . }}</a>
{{- end -}}
{{- range .Params.tags }}
<a class="label label-success" href="/tags/{{ lower . }}">{{ title . }}</a>
{{- end }}
</div>
</div>
<div class="row vertical-align">
@@ -40,12 +51,7 @@
<div class="panel panel-default">
<div class="panel-body">
<div class="blogpost">
{{ if isset .Params "headerimage" }}
<div class="header-image">
<img src="/img/{{ .Params.headerImage }}" />
<p>{{ with .Params.headercredits }}{{ . | markdownify }}{{ end }}</p>
</div>
{{ end }}
{{ partial "blog/headerimage" . }}
{{ .Content }}
<!-- only show related posts if param is true, or if it's not a page -->
{{ if or (eq .Params.related true) (ne .Params.page true) }}

View File

@@ -0,0 +1,21 @@
{{- $page := . -}}
{{- $image := "" }}
{{- with $page.Params.headerimage }}
<div class="header-image">
{{- if eq $page.BundleType "leaf" }}
{{- with $page.Resources.GetMatch .src }}
{{- $image = . }}
{{- end }}
{{- else }}
{{- with resources.GetMatch (printf "**/%s" .src) }}
{{- $image = . }}
{{- end }}
{{- end }}
{{- $processes := .processes | default (slice "fill 1000x440 webp" )}}
{{- $image = partial "image-processing" (dict "image" $image "processes" $processes "filter" .filter) -}}
{{- with $image }}
<img src="{{ .RelPermalink }}" />
{{- end }}
{{- with .text }}<p>{{ . | markdownify }}</p>{{ end }}
</div>
{{- end }}

View File

@@ -0,0 +1,13 @@
{{- $cats := .Page.Params.categories }}
{{- $symbols := dict "article" "🗞️" "presentation" "🎤" "podcast" "🎧" }}
{{- $icon := "" }}
{{- $title := "" }}
{{- range $cat := $cats }}
{{- with index $symbols $cat }}
{{- $icon = . }}
{{- $title = $cat | humanize }}
{{- end }}
{{- end }}
{{- with $icon }}
<span title="{{ $title }}">{{ $icon }}&nbsp;&nbsp;</span>
{{- end -}}

View File

@@ -0,0 +1,12 @@
{{- $cats := .Page.Params.categories }}
{{- $symbols := dict "article" "Article published" "presentation" "Presentation given" "podcast" "Podcast released" }}
{{- $selection := "" }}
{{- range $cat := $cats }}
{{- with index $symbols $cat }}
{{- $selection = . }}
{{- end }}
{{- end }}
{{- if not $selection }}
{{- $selection = "Blogged" }}
{{- end }}
{{- return $selection }}

View File

@@ -12,8 +12,6 @@
{{- $title = print .Site.Title " | " .Title -}}
{{- end -}}
{{- end -}}
{{- $image := path.Join "/img" .Site.Params.avatar -}}
{{- if isset .Params "headerimage" }} {{ $image = print "img/" .Params.headerimage }} {{ end -}}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -29,18 +27,32 @@
<!-- CSS and JS -->
{{- partialCached "head/css.html" . }}
{{ "<!-- Open Graph meta-data (e.g. Facebook) -->" | safeHTML }}
<meta property="og:title" content="{{ $title }}"/>
<meta property="og:url" content="{{ .Permalink | absURL }}"/>
<meta property="og:image" content="{{ $image | absURL }}"/>
<meta property="og:description" content="{{ .Summary | truncate 200 }}"/>
<!-- Get image for social media sharing -->
{{- $image := "" -}}
{{- $imagesrc := (.Page.Params.headerimage.src | default .Site.Params.avatar) -}}
{{- if eq .Page.BundleType "leaf" }}
{{- with .Page.Resources.GetMatch $imagesrc }}
{{- $image = . -}}
{{- end }}
{{- else }}
{{- with resources.GetMatch (printf "**/%s" $imagesrc) }}
{{- $image = . -}}
{{- end }}
{{- end }}
{{- if $image }}
{{- $image = $image.Fill "1200x630 jpg" -}}
{{- end }}
{{ "<!-- Twitter meta-data -->" | safeHTML }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@{{ .Site.Params.social.twitter }}"/>
<meta name="twitter:title" content="{{ $title }}"/>
<meta name="twitter:description" content="{{ .Summary | truncate 200 }}"/>
<meta name="twitter:image" content="{{ $image | absURL }}"/>
<meta name="twitter:url" content="{{ .Permalink | absURL }}"/>
<meta name="twitter:creator" content="@{{ .Site.Params.social.twitter }}"/>
<!-- Open Graph meta-data (e.g. Facebook) -->
<meta property="og:type" content="article"/>
<meta property="og:site_name" content="{{ .Site.Title }}"/>
<meta property="og:title" content="{{ $title }}"/>
<meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:description" content="{{ (.Summary | default .Site.Params.description) | truncate 200 }}"/>
{{- with $image }}
<meta property="og:image" content="{{ .Permalink }}"/>
<meta property="og:image:type" content="{{ .MediaType }}">
<meta property="og:image:width" content="{{ .Width }}">
<meta property="og:image:height" content="{{ .Height }}">
{{- end }}
</head>

View File

@@ -0,0 +1,32 @@
{{- /* Expects .image (resolved image resource), optionally .processes and .filter */}}
{{- $image := .image }}
{{- range .processes }}
{{- $image = $image.Process . }}
{{- end }}
{{- with .filter }}
{{- $filters := slice }}
{{- range . }}
{{- range $method, $args := . }}
{{/* No, this cannot be generalised, as strings cannot be converted to functions... */}}
{{- if eq $method "GaussianBlur" }}
{{- $filters = $filters | append (images.GaussianBlur $args) }}
{{- else if eq $method "Brightness" }}
{{- $filters = $filters | append (images.Brightness $args) }}
{{- else if eq $method "Opacity" }}
{{- $filters = $filters | append (images.Opacity $args) }}
{{- else if eq $method "Pixelate" }}
{{- $filters = $filters | append (images.Pixelate $args) }}
{{- else if eq $method "Saturation" }}
{{- $filters = $filters | append (images.Saturation $args) }}
{{- else if eq $method "Sepia" }}
{{- $filters = $filters | append (images.Sepia $args) }}
{{- else if eq $method "Grayscale" }}
{{- $filters = $filters | append images.Grayscale }}
{{- else }}
{{- warnf "Unsupported filter: %s" $method }}
{{- end }}
{{- end }}
{{- end }}
{{- $image = $image.Filter $filters }}
{{- end }}
{{- return $image }}