summaryrefslogtreecommitdiff
path: root/ruter/rute1/mueller/moenster
AgeCommit message (Collapse)Author
2024-04-06convert img and template directives to shortcodesJonas Smedegaard
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;' '{}' + ```
2024-04-06rename *.mdwn to */index.md, except index/topbar/farbar/sidebar filesJonas Smedegaard
command: ``` perl -MPath::Tiny -WE 'use strict; path(".")->visit(sub{return unless -f && /\.mdwn$/; my $stem=$_->basename(".mdwn"); my $new=$_->sibling($stem,"index.md"); return if $stem =~ /^index|topbar|sidebar|farbar|footer$/ || $new->exists; $new->parent->mkpath; system("git","mv", $_, $new)},{recurse=>1})' ```
2022-10-28normalize headlines to have one leading space and no trailing spaceJonas Smedegaard
command: ``` find * -type f -name '*.mdwn' -execdir perl -pi -e 's/^(#+)\s*([^\s#].*?)\h*$/$1 $2/g;' '{}' + ```
2012-02-24Nye sidebars med navigation.Siri Reiter