From 2babefddb5b38b7a2d65c528c246a2e6705660a4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 19 Jun 2022 21:53:30 +0200 Subject: convert meta and tag directives to TOML frontmatter command: ``` find * -type f -name '*.md' -execdir perl -MTOML::Tiny=to_toml -C63 -gni -E '%x=();s/\[\[!meta\s+(title|date)="?([^\]"]+?)\s*"?\s*\]\]\s*\n*/$x{$1}=$2;""/eg; s/\[\[!meta\s+stylesheet="?edu"?\s+rel="?stylesheet"?\s*\]\]\n*/$x{taxonomies}{categories}=["education"];""/e; s/\[\[!tag((?:\s+[^\]\s]+)+)\s*\]\]\n*/push @{$x{taxonomies}{tags}}, $1=~m{\S+}g;""/eg; s/\[\[!meta\s+(?:author|name)="?([^\]"]+?)\s*"?\s*\]\]\s*\n*/$x{extra}{author}=$1;""/eg; say "+++"; say to_toml({%x}); say "+++"; say $_' '{}' + ``` --- vejviseren/bagomborsen/index.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'vejviseren/bagomborsen') diff --git a/vejviseren/bagomborsen/index.md b/vejviseren/bagomborsen/index.md index cf6ffb68..e7db0759 100644 --- a/vejviseren/bagomborsen/index.md +++ b/vejviseren/bagomborsen/index.md @@ -1,5 +1,16 @@ -[[!meta title="Bag om Børsen"]] ++++ +date=2013-03-25 +title="Bag om Børsen" +[taxonomies] +tags=[ + "blog", + "vejviseren", + "sted", + "boersen", + "artikel", +] ++++ [[!if test="included()" then=""" {{ img(path="120723boersen.jpg" class="blog" link="/vejviseren/bagomborsen") }} @@ -56,6 +67,4 @@ Børsens spir er i et sæt med Københavns andre "Snurrige tårne" - Vor Frelse """]] -[[!tag blog vejviseren]] -[[!tag sted boersen artikel]] -[[!meta date="2013-03-25"]] + -- cgit v1.2.3