LIST

obsidian blog plugin frontmatter-generator config

plugin: frontmatter-generator obsidian://show-plugin?id=frontmatter-generator config: { title: file.properties.title, ...file.properties, lastmod: file.properties.lastmod || file.properties.updated || file.properties.modified, date: file.properties.date || file.properties.created.split("T")[0], slug: file.properties.title.toLowerCase() .replaceAll(/[^a-zA-Z0-9]+/g, '-'), aliases: [...new Set([ file.basename, file.basename + '.md', ...(file.properties.aliases || []), ...(file.properties.slug ? [file.properties.slug] :[]), ])].filter(f => f !== file.properties.title.toLowerCase() .replaceAll(/[^a-zA-Z0-9]+/g, '-') ), }

April 5, 2025

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

xq xml query evernote enex

random util some stuff from my history 3881 xq ~/Downloads/yarle-test/input/foo_export_test.enex 'del(.note)' 3882 xq 'del(.note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3883 xq 'del(.en-export)' ~/Downloads/yarle-test/input/foo_export_test.enex 3888 xq 'del(.en-export)' ~/Downloads/yarle-test/input/foo_export_test.enex 3889 xq 'del(.note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3890 xq 'del(."en-export".note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3891 xq 'del(."en-export".note)' ~/Downloads/yarle-test/input/export_test.enex 3892 xq ~/Downloads/yarle-test/input/export_test.enex 3893 xq '.' ~/Downloads/yarle-test/input/export_test.enex 3898 less Blog.enex ➜ ~ ls -l /opt/homebrew/bin/xq lrwxr-xr-x 1 tjen admin 32 3 jul 19:25 /opt/homebrew/bin/xq -> ../Cellar/python-yq/3.4.3/bin/xq strip content from xml xq 'del(."en-export".note[].content)' ~/Downloads/yarle-run/input/evernote.toc/all/Blog.enex { “en-export”: { “@export-date”: “20231213T100406Z”, “@application”: “Evernote”, “@version”: “10....

August 6, 2024

blog edit frontmatter

find . -type f -name "*.md" -exec sed -i ".bak" -e '/^---$/,/^---$/s/^ //' -e '/^---$/,/^---$/s/^created: \(.*\)$/date: \1\ncreated: \1/' -e '/^---$/,/^---$/s/^evernoteGuid: \(.*\)$/evernoteGuid: \1\nslug: \1/' -e '/^---$/,/^---$/s/^updated: \(.*\)$/updated: \1\nlastmod: \1/' {} \;

August 5, 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