Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Binary file added bin/pagefind
Binary file not shown.
15 changes: 10 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions content/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
+++
date = 2025-02-06T14:55:00Z
draft = false
title = "Sök"
aliases = ["/search/"]
+++

<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
<script src="/pagefind/pagefind-ui.js"></script>
<div id="search"></div>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", showSubResults: true });
});
</script>