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;' '{}' + ``` --- vejviseren/opgave_13-04/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vejviseren/opgave_13-04') diff --git a/vejviseren/opgave_13-04/index.md b/vejviseren/opgave_13-04/index.md index 59093cc9..a14d6171 100644 --- a/vejviseren/opgave_13-04/index.md +++ b/vejviseren/opgave_13-04/index.md @@ -2,7 +2,7 @@ [[!if test="included()" then=""" -[[!img tippensten.jpg class="blog" link="/vejviseren/opgave_13-04"]] +{{ img(path="tippensten.jpg" class="blog" link="/vejviseren/opgave_13-04") }} ## Månedsopgave, april 2013. Besvar spørgsmål om bl.a. mursten og brosten. @@ -14,9 +14,9 @@ else=""" [[!template id="deco" text=" -[[!img tippensten.jpg class="deco"]] -[[!img brosten.jpg class="deco"]] -[[!img murdetail.jpg class="deco"]] +{{ img(path="tippensten.jpg" class="deco") }} +{{ img(path="brosten.jpg" class="deco") }} +{{ img(path="murdetail.jpg" class="deco") }} "]] -- cgit v1.2.3