LIST

hugo content with obsidian wikilinks

inspired by: https://github.com/milafrerichs/hugo-wikilinks copy relevant files from your template into matching folder cp themes/PaperMod/layouts/_default/single.html layouts/_default/single.html cp themes/PaperMod/layouts/_default/list.html layouts/_default/list.html change content rendering to use the wikilinks partial old: single.html ... {{- if .Content }} <div class="post-content"> {{- if not (.Param "disableAnchoredHeadings") }} {{- partial "anchored_headings.html" .Content -}} {{- else }}{{ .Content }}{{ end }} </div> {{- end }} ... new: single.html ... {{- if .Content }} <div class="post-content"> {{- if in ....

January 4, 2025

reload blog v2

rm -r static/resources content/blog content/filing* public cp -pr ~/Downloads/yarle-run/output8/notes/evernote.toc.titled/all/blog ./content/ cp -pr ~/Downloads/yarle-run/output8/notes/evernote.toc/filing/filing-* ./content/ mv content/blog/resources static rm -r content/filing-learning-notes/resources rm -r content/filing-web/resources fix title with quotes breaking frontmatter fix title with quotes breaking frontmatter blog sed tag published to draft blog sed tag published to draft blog sed fix missing tags blog sed fix missing tags blog sed fix hashtag in frontmatter tags blog sed fix hashtag in frontmatter tags...

September 3, 2024

blog sed fix hashtag in frontmatter tags

content-fix-frontmatter-hashtag.sed /^tags: .*"#".*$/s/"#","#"/"starred"/g /^tags: .*"#".*$/s/"#"/"starred"/g /^tags: .*#.*$/s/#//g Speedrun find content/blog -type f -name '*.md' -exec sed -i "" -f content-fix-frontmatter-hashtag.sed {} \;

August 19, 2024

blog sed fix missing tags

which files grep -LR '^tags: ' content/everblog | grep ".md$" single file fix sed '/^---$/,/^---$/s/^$/tags: []\ndraft: true/' content/everblog/opinion-stop-wasting-a-perfectly-good-bug.md merge echo 'content/everblog/insight-heroes-journey-why.md' | xargs -I {} sed '/^---$/,/^---$/s/^$/tags: []\ndraft: true/' {} Speedrun grep -LR '^tags: ' content/blog | grep ".md$" | xargs -I {} sed -i "" '/^---$/,/^---$/s/^$/tags: []\ndraft: true/' {}

August 19, 2024

blog sed tag published to draft

sed -e '/---/,/---/s/^\(tags: .*"#published".*\)$/\1\ndraft: false/' -e t -e '/---/,/---/s/^\(tags: .*\)$/\1\ndraft: true/' -e t -e '2n; /---/i\ draft: true' content/blog/article-on-the-diverse-and-fantastical-shapes-of-testing-martin-fowler.md | head content-parse-draft-from-published-tag.sed /^---$/,/^---$/s/^\(tags: .*"#published".*\)$/\1\ndraft: false/ t /^---$/,/^---$/s/^\(tags: .*\)$/\1\ndraft: true/ Speedrun find content/blog -type f -name '*.md' -exec sed -i "" -f content-parse-draft-from-published-tag.sed {} \;

August 19, 2024

reload blog

rm -r static/resources rm -r content/everblog rm -r public cp -r ~/Downloads/yarle-run/output4/notes/Blog content/everblog mv content/everblog/resources static fix title with quotes breaking frontmatter grep -R 'title: ".*".*"$' ./content/everblog | sed 's/:.*//' | sed 's!^\(.*\)!sed -i "" -e '"'"'/^title: ".*".*"$/s/"//g'"'"' -e '"'"'/^title: [^"]*$/s/title: \\(.*\\)/title: "\\1"/'"'"' "\1"! ' | zsh parse draft/no-draft blog sed tag published to draft find content/everblog -type f -name '*.md' -exec sed -i "" -f content-parse-draft-from-published-tag.sed {} \; #todo: fix title with _ should be :...

August 6, 2024

create hugo site

hugo new site blog --format yaml cd blog git init git add . git commit -m "generated hugo site" git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically) echo 'theme: ["PaperMod"]' >> hugo.yaml git add . git commit -m "theme PaperMod"

August 5, 2024