diff --git a/Makefile b/Makefile index 3894564c..e9f4cae3 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,17 @@ all: deploy international: grep -l "^english\s\?=\s\?true" content/avsnitt/*.md | xargs -I args cp -f args content/international/ +# Pagefind will not be reindexed on hot reloads when saving +# changes, but the --serve pagefind provides does not have +# that feature so this will have to do serve: international + @hugo --theme=kodsnack --buildFuture --buildDrafts + @bin/pagefind --site public @hugo server --theme=kodsnack --buildFuture --buildDrafts --watch deploy: international - @hugo --theme=kodsnack --buildFuture --buildExpired --enableGitInfo --logFile /mnt/persist/hugo.log -d ${DEST} - @hugo --theme=kodsnack -D --buildFuture --buildExpired --enableGitInfo --logFile /mnt/persist/hugo.log -d ${BETA_DEST} + @hugo --theme=kodsnack --buildFuture --buildExpired --enableGitInfo -d ${DEST} >> /mnt/persist/hugo.log 2>&1 + @bin/pagefind --site ${DEST} >> logdir/hugo.log 2>&1 + @hugo --theme=kodsnack -D --buildFuture --buildExpired --enableGitInfo -d ${BETA_DEST} >> /mnt/persist/hugo.log 2>&1 + @bin/pagefind --site ${BETA_DEST} >> logdir/hugo.log 2>&1 + \ No newline at end of file diff --git a/bin/pagefind b/bin/pagefind new file mode 100755 index 00000000..2aa4966a Binary files /dev/null and b/bin/pagefind differ diff --git a/config.toml b/config.toml index 7fed069c..b4ae4a56 100644 --- a/config.toml +++ b/config.toml @@ -28,30 +28,35 @@ avsnitt = "/:slug/" url = "/om/" weight = -200 +[[menu.main]] + name = "Sök" + url = "/search/" + weight = -199 + [[menu.main]] name = "Slack" url = "https://join.slack.com/t/podsnack/shared_invite/zt-wh2ussm9-xFOqpvjgF16G2eDhaBy1hw" - weight = -199 + weight = -198 [[menu.main]] name = "Alla avsnitt" url = "/avsnitt/" - weight = -198 + weight = -197 [[menu.main]] name = "🛒 Handla" url = "https://shop.spreadshirt.se/kodsnack/" - weight = -197 + weight = -196 [[menu.main]] name = "📣 Sponsra" url = "/sponsra/" - weight = -196 + weight = -195 [[menu.main]] name = "📡 RSS" url = "https://feeds.kodsnack.se" - weight = -195 + weight = -194 [[menu.main]] name = "| iTunes" diff --git a/content/search.md b/content/search.md new file mode 100644 index 00000000..84f2ce52 --- /dev/null +++ b/content/search.md @@ -0,0 +1,15 @@ ++++ +date = 2025-02-06T14:55:00Z +draft = false +title = "Sök" +aliases = ["/search/"] ++++ + + + +
+ \ No newline at end of file