From 30b9669ea95e6b3b4f48a25c8045c2b4f551dacd Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 19 Jun 2022 21:48:10 +0200 Subject: convert img and template directives to shortcodes command: ``` find * -type f -name '*.md' -execdir perl -gpi -e 's/\[\[!img\s+([^\s\]"]+)(\s(?:[^\]]|"[^"]*")+?)?\s*\]\]/{{ img(path="$1"$2) }}/g; s/\[\[!template\s+id="?(columns|note|video)"?\s+([^\]]+?)\s*\]\]/{{ $1($2) }}/g;' '{}' + ``` --- english/city/index.md | 12 ++++++------ english/contact/index.md | 6 +++--- english/copenhagen/index.md | 10 +++++----- english/index.md | 8 ++++---- english/prices/index.md | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'english') diff --git a/english/city/index.md b/english/city/index.md index 734b0c18..5bc438de 100644 --- a/english/city/index.md +++ b/english/city/index.md @@ -1,10 +1,10 @@ [[!template id="deco" text=" -[[!img magsstrede.jpg class="deco"]] -[[!img rundetaarn.jpg class="deco"]] -[[!img chrIXstatue.jpg class="deco"]] -[[!img Nyhavnsolgraa.jpg class="deco"]] -[[!img gardemusik.jpg class="deco"]] -[[!img kanalbaad.jpg class="deco"]] +{{ img(path="magsstrede.jpg" class="deco") }} +{{ img(path="rundetaarn.jpg" class="deco") }} +{{ img(path="chrIXstatue.jpg" class="deco") }} +{{ img(path="Nyhavnsolgraa.jpg" class="deco") }} +{{ img(path="gardemusik.jpg" class="deco") }} +{{ img(path="kanalbaad.jpg" class="deco") }} "]] # Copenhagen City Walks diff --git a/english/contact/index.md b/english/contact/index.md index 04e92a04..c5501586 100644 --- a/english/contact/index.md +++ b/english/contact/index.md @@ -1,7 +1,7 @@ [[!template id="deco" text=" -[[!img gardemusik.jpg class="deco"]] -[[!img regnbue.jpg class="deco"]] -[[!img guidesign.jpg class="deco"]] +{{ img(path="gardemusik.jpg" class="deco") }} +{{ img(path="regnbue.jpg" class="deco") }} +{{ img(path="guidesign.jpg" class="deco") }} "]] diff --git a/english/copenhagen/index.md b/english/copenhagen/index.md index d8d8a9d8..4bb3a32b 100644 --- a/english/copenhagen/index.md +++ b/english/copenhagen/index.md @@ -1,9 +1,9 @@ [[!template id="deco" text=" -[[!img tubalow.jpg class="deco"]] -[[!img knabrostr.jpg class="deco"]] -[[!img tours/amalienbaad.jpg class="deco"]] -[[!img slotsholmsport.jpg class="deco"]] -[[!img havnen/kanalbaad.jpg class="deco"]] +{{ img(path="tubalow.jpg" class="deco") }} +{{ img(path="knabrostr.jpg" class="deco") }} +{{ img(path="tours/amalienbaad.jpg" class="deco") }} +{{ img(path="slotsholmsport.jpg" class="deco") }} +{{ img(path="havnen/kanalbaad.jpg" class="deco") }} "]] ## COPENHAGEN CITY DIRECTORY diff --git a/english/index.md b/english/index.md index 98a9f01c..f35c7bc0 100644 --- a/english/index.md +++ b/english/index.md @@ -1,10 +1,10 @@ [[!meta title="Copenhagen sightseeing and city walks by Byvandring.nu"]] [[!template id="deco" text=" -[[!img egomargrethe.jpg class="deco"]] -[[!img rundetaarn.jpg class="deco"]] -[[!img gardemusik.jpg class="deco"]] -[[!img tubacity.jpg class="deco"]] +{{ img(path="egomargrethe.jpg" class="deco") }} +{{ img(path="rundetaarn.jpg" class="deco") }} +{{ img(path="gardemusik.jpg" class="deco") }} +{{ img(path="tubacity.jpg" class="deco") }} "]] # Welcome to Copenhagen diff --git a/english/prices/index.md b/english/prices/index.md index d81db64e..2b61c6db 100644 --- a/english/prices/index.md +++ b/english/prices/index.md @@ -1,7 +1,7 @@ [[!template id="deco" text=" -[[!img kronborgmecklenburg.jpg class="deco"]] -[[!img vesterbro/haverestaurant.jpg class="deco"]] -[[!img cykelture/bryggecykler.jpg class="deco"]] +{{ img(path="kronborgmecklenburg.jpg" class="deco") }} +{{ img(path="vesterbro/haverestaurant.jpg" class="deco") }} +{{ img(path="cykelture/bryggecykler.jpg" class="deco") }} "]] # Terms and conditions -- cgit v1.2.3