summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2022-06-19 21:53:30 +0200
committerJonas Smedegaard <dr@jones.dk>2024-04-06 10:37:11 +0200
commit2babefddb5b38b7a2d65c528c246a2e6705660a4 (patch)
tree0b9d90361db41fedd853e4a1e0fa82c07e1b7984 /test
parent30b9669ea95e6b3b4f48a25c8045c2b4f551dacd (diff)
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 $_' '{}' + ```
Diffstat (limited to 'test')
-rw-r--r--test/broer/index.md4
-rw-r--r--test/city-kvarter/index.md4
-rw-r--r--test/index.md4
-rw-r--r--test/obro-kvarter/index.md4
-rw-r--r--test/offentlighedsloven-tur/index.md4
-rw-r--r--test/offentlighedsloven/index.md6
-rw-r--r--test/osterbro-attraktion-tur/index.md5
-rw-r--r--test/osterbro-attraktion/index.md17
-rw-r--r--test/ostervold-tur/index.md4
-rw-r--r--test/tordenskjold/index.md6
10 files changed, 49 insertions, 9 deletions
diff --git a/test/broer/index.md b/test/broer/index.md
index e9881049..0d5a7e82 100644
--- a/test/broer/index.md
+++ b/test/broer/index.md
@@ -1,3 +1,6 @@
++++
+
++++
# Brokvartererne
[[!template stamen=toner-lite id=map bounds-nw="55.70845,12.53386" bounds-se="55.66239,12.59703"]]
<script>
@@ -93,3 +96,4 @@ var polygon = L.polygon([
]).addTo(map);
polygon.bindPopup("<a href=../../norrebro/>Ture på Nørrebro</a>");
</script>
+
diff --git a/test/city-kvarter/index.md b/test/city-kvarter/index.md
index df68fd6d..073fa67b 100644
--- a/test/city-kvarter/index.md
+++ b/test/city-kvarter/index.md
@@ -1,3 +1,6 @@
++++
+
++++
# City
[[!template id=map bounds-nw="55.69225, 12.56166" bounds-se="55.66819, 12.60321"]]
<script>
@@ -9,3 +12,4 @@ var polygon = L.polygon([
]).addTo(map);
polygon.bindPopup("<a href=../offentlighedsloven/>Offentlig/ Hemmelig vandring på Slotsholmen</a><br><a href=../test/offentlighedsloven-tur/>Gå til turkort</a>");
</script>
+
diff --git a/test/index.md b/test/index.md
index f035566e..8e763b64 100644
--- a/test/index.md
+++ b/test/index.md
@@ -1,3 +1,6 @@
++++
+
++++
[[!meta stylesheet=front rel=stylesheet]]
{{ columns(content="""
@@ -6,3 +9,4 @@
[[!inline pages="( tagged(forside) or tagged(test) ) and tagged(bottom) and !tagged(top)" sort=mtime]]
"""]]
+
diff --git a/test/obro-kvarter/index.md b/test/obro-kvarter/index.md
index 3a1565bd..df2c49e3 100644
--- a/test/obro-kvarter/index.md
+++ b/test/obro-kvarter/index.md
@@ -1,3 +1,6 @@
++++
+
++++
# Ture på Østerbro
[[!template id=map bounds-nw="55.71657, 12.5572" bounds-se="55.68813, 12.59737"]]
@@ -36,3 +39,4 @@ polygon.bindPopup("<a href=../../osterbro-attraktion/>Østerbros Attraktioner</a
var waypoint = L.marker([55.6992, 12.5772]).addTo(map);
waypoint.bindPopup("<a href=../../osterbro-attraktion/>Østerbros Attraktioner</a><br><a href=../osterbro-attraktion/>Gå til turbeskrivelsen</a>");
</script>
+
diff --git a/test/offentlighedsloven-tur/index.md b/test/offentlighedsloven-tur/index.md
index ba1f4d77..6f251d6e 100644
--- a/test/offentlighedsloven-tur/index.md
+++ b/test/offentlighedsloven-tur/index.md
@@ -1,2 +1,6 @@
++++
+
++++
# [Ud af Østervold|ostervold]
[[!template id=map bounds-nw="55.69539, 12.55926" bounds-se="55.6679, 12.59789"]]
+
diff --git a/test/offentlighedsloven/index.md b/test/offentlighedsloven/index.md
index cdab15c3..52ffb311 100644
--- a/test/offentlighedsloven/index.md
+++ b/test/offentlighedsloven/index.md
@@ -1,5 +1,6 @@
-[[!meta title="Offentlig/ Hemmelig vandring på Slotsholmen"]]
-
++++
+title="Offentlig/ Hemmelig vandring på Slotsholmen"
++++
[[!if test="included()" then="""
{{ img(path="offentlighedsloven/horsesass.jpg" size="200x" link="offentlighedsloven") }}
@@ -64,3 +65,4 @@ Du kan bidrage til en musikvideo om Loven - "De Mørke Fyrsters Spil".
Er du på Facebook, får du opdageringer ved at [melde dig ind her](https://www.facebook.com/NejTakTilDenNyeOffentlighedslov?fref=ts)
"""]]
+
diff --git a/test/osterbro-attraktion-tur/index.md b/test/osterbro-attraktion-tur/index.md
index 4dcae232..d49302e7 100644
--- a/test/osterbro-attraktion-tur/index.md
+++ b/test/osterbro-attraktion-tur/index.md
@@ -1,7 +1,10 @@
-[[!meta title="Østerbros attraktioner"]]
++++
+title="Østerbros attraktioner"
++++
# [[Østerbros attraktioner|/osterbro-attraktion]]
[[!template id=map bounds-nw="55.709, 12.56261" bounds-se="55.6965, 12.5911"]]
<script>
var waypoint = L.marker([55.6992, 12.5772]).addTo(map);
waypoint.bindPopup("<a href=../../osterbro-attraktion/>Østerbros Attraktioner</a><br><a href=../osterbro-attraktion/>Gå til turbeskrivelsen</a>");
</script>
+
diff --git a/test/osterbro-attraktion/index.md b/test/osterbro-attraktion/index.md
index 78204a21..53e9f93f 100644
--- a/test/osterbro-attraktion/index.md
+++ b/test/osterbro-attraktion/index.md
@@ -1,7 +1,17 @@
++++
+title="Østerbros Attraktioner"
+
+[taxonomies]
+tags=[
+ "ture",
+ "standard",
+ "trianglen",
+ "parken",
+ "Brumleby",
+]
++++
[[!meta stylesheet=test rel=stylesheet]]
-[[!meta title="Østerbros Attraktioner"]]
-
[[!if test="included()" then="""
{{ img(path="osterbro-attraktion/triangelbar.jpg" size="x200") }}
@@ -49,5 +59,4 @@ tillokkende del af København.
"""]]
-[[!tag ture standard ]]
-[[!tag trianglen parken Brumleby ]] \ No newline at end of file
+
diff --git a/test/ostervold-tur/index.md b/test/ostervold-tur/index.md
index 76dbdb1a..d9946cff 100644
--- a/test/ostervold-tur/index.md
+++ b/test/ostervold-tur/index.md
@@ -1,3 +1,7 @@
++++
+
++++
# [[Ud af Østervold|ostervold]]
[[!template stamen=toner-lite id=map bounds-nw="55.70845,12.53386" bounds-se="55.66239,12.59703"]]
+
diff --git a/test/tordenskjold/index.md b/test/tordenskjold/index.md
index b609e84c..335418c8 100644
--- a/test/tordenskjold/index.md
+++ b/test/tordenskjold/index.md
@@ -1,5 +1,6 @@
-[[!meta title="Tordenskjold i København. Byvandring anno 1720."]]
-
++++
+title="Tordenskjold i København. Byvandring anno 1720."
++++
[[!if test="included()" then="""
I februar 2016 rider Tordenskjold over lærredet i en barok road movie om venskab og skæbne. Mens han farer vild på landevejen, tager Vejviseren dig en tur i søheltens kølvand langs byens kajer i år 1720 og derefter.
@@ -83,3 +84,4 @@ Den nye film spinder sin egen ende over Tordenskjolds død, og holder unge Lehn
"""]]
+