Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ebf604e
initial search support
CGBassPlayer Jan 17, 2024
e29f4e1
Update test; ignore episodes on people pages
CGBassPlayer Feb 19, 2024
fee627f
start working on pagefind in dockerfile
CGBassPlayer Jul 29, 2024
f2452ea
add search indexing for production build
CGBassPlayer Feb 18, 2025
2fe0e41
Cleanout dev container file
CGBassPlayer Feb 18, 2025
8daedfc
chore: revert unrelated reformatting on search branch
CGBassPlayer Nov 2, 2026
e6fc43b
feat(search): index pages for picks and sponsors
CGBassPlayer Nov 2, 2026
5ed8c72
feat(search): index scope, ISO sort date, type/show/date meta
CGBassPlayer Nov 2, 2026
b346cc1
feat(search): results UI with pick and sponsor ranking, recency, show…
CGBassPlayer Nov 2, 2026
53f32da
build: pagefind binary in prod and dev images, auto re-index in dev
CGBassPlayer Nov 2, 2026
575d457
Merge branch 'develop' into pagefind-search
CGBassPlayer Nov 2, 2026
3bd7c3f
Merge remote-tracking branch 'upstream/develop' into pagefind-search
CGBassPlayer Nov 6, 2026
04fde77
build: bump pagefind to 1.6.0
CGBassPlayer Nov 8, 2026
9b6eb54
fix(search): promote show/person title matches above episodes
CGBassPlayer Nov 8, 2026
2de61eb
fix(search): index each show and person once
CGBassPlayer Nov 8, 2026
cb9c07c
feat(search): show chip on sponsor results
CGBassPlayer Nov 8, 2026
b1a4deb
feat(search): rank archived shows and their episodes lower
CGBassPlayer Nov 8, 2026
41044b8
Merge remote-tracking branch 'origin/develop' into pagefind-search-merge
CGBassPlayer Nov 11, 2026
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
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM registry.gitlab.com/pages/hugo/hugo_extended:0.105.0 AS builder
ARG HUGO_VERSION=0.105.0
FROM registry.gitlab.com/pages/hugo/hugo_extended:${HUGO_VERSION} AS builder
# this defaults to an empty variable
ARG BASE_URL
WORKDIR /site
Expand All @@ -12,6 +13,16 @@ RUN set -x && ( [ -z "${BASE_URL}" ] || [ "${BASE_URL}" == "PROD" ] ) \
&& hugo --gc \
|| ( [ "${BASE_URL}" == 'TESTS_WEB' ] && hugo --gc --baseURL "/" || exit 1 )


FROM alpine AS indexer
ARG PAGEFIND_VERSION=1.6.0
WORKDIR /site
RUN wget -qO- "https://github.com/Pagefind/pagefind/releases/download/v${PAGEFIND_VERSION}/pagefind_extended-v${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| tar xz -C /usr/local/bin pagefind_extended
COPY --from=builder /site/public /site/public
RUN pagefind_extended --site public && rm -rf public/search-index


FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
RUN sed -i 's/#error_page/error_page/' /etc/nginx/conf.d/default.conf
Expand All @@ -21,4 +32,4 @@ RUN sed -i 's/#error_page/error_page/' /etc/nginx/conf.d/default.conf
# episodes.json need no override: stock mime.types already serve .txt as
# text/plain and .json as application/json.)
RUN sed -i '/listen /i\ location ~ \\.md$ { root /usr/share/nginx/html; default_type text/markdown; }' /etc/nginx/conf.d/default.conf
COPY --from=builder /site/public /usr/share/nginx/html
COPY --from=indexer /site/public /usr/share/nginx/html
7 changes: 5 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ARG HUGO_VERSION=0.105.0
FROM registry.gitlab.com/pages/hugo/hugo_extended:${HUGO_VERSION}
CMD [ "serve", "-D", "--bind", "0.0.0.0" ]
ENTRYPOINT [ "hugo" ]
ARG PAGEFIND_VERSION=1.6.0
# The image's apk points at edge, whose inotify-tools segfaults on this base's musl; use the v3.17 build.
RUN apk add --no-cache --repositories-file /dev/null -X https://dl-cdn.alpinelinux.org/alpine/v3.17/main inotify-tools \
&& wget -qO- https://github.com/Pagefind/pagefind/releases/download/v${PAGEFIND_VERSION}/pagefind_extended-v${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz | tar -xz -C /usr/local/bin pagefind_extended
ENTRYPOINT [ "sh", "-c", "D=${TMPDIR:-/tmp}/jb-public; hugo server -D --bind 0.0.0.0 --renderToDisk --disableFastRender --destination $D 2>&1 | tee $D.log & until grep -q 'Web Server is available' $D.log 2>/dev/null; do sleep 1; done; pagefind_extended --site $D; while inotifywait -r -q -e modify,create,delete content data themes; do sleep 3; until tail -n1 $D.log | grep -q 'Total in\\|Press Ctrl'; do sleep 1; done; pagefind_extended --site $D; done" ]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ help:
dev-build: ## Generate the development docker container
docker build --rm -f Dockerfile.dev -t jb_hugo:latest .

dev: dev-build ## Run the development hugo container
dev: dev-build ## Run the development hugo container (serves /search/; first start indexes the site, edits re-index automatically)
docker run --rm -it -v "$${PWD}":/app -w /app -p $${HOST_IP:-127.0.0.1}:1313:1313 jb_hugo:latest

dev-metrics: dev-build ## Run the development hugo container with metrics
docker run --rm -it -v "$${PWD}":/app -w /app -p $${HOST_IP:-127.0.0.1}:1313:1313 jb_hugo:latest serve -D --bind 0.0.0.0 --templateMetrics --templateMetricsHints
docker run --rm -it --entrypoint hugo -v "$${PWD}":/app -w /app -p $${HOST_IP:-127.0.0.1}:1313:1313 jb_hugo:latest serve -D --bind 0.0.0.0 --templateMetrics --templateMetricsHints

dev-tests: dev-build ## Run the development hugo container with every page pre-rendered (for `make tests` with parallel workers)
docker run --rm -it -v "$${PWD}":/app -w /app -p $${HOST_IP:-127.0.0.1}:1313:1313 jb_hugo:latest serve -D --bind 0.0.0.0 --disableFastRender
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ To build and run the site run

This will build the site (all 28000+ pages) and takes anywhere from 30s - 5 minutes depending on your hardware. This is expected due to the size of the site.

#### Search

Search is [Pagefind](https://pagefind.app), run against the built site (`pagefind_extended --site`) in both the production `Dockerfile` and `make dev`. In `make dev` the first start also builds the index, so `/search/` works after about 2 to 5 minutes, and edits to `content`, `data` or `themes` re-index automatically (a few minutes after each change).

Picks (`data/picks/*.yaml`) and sponsors have no pages of their own to index, so picks get a stub in `content/search-index/picks/<name>.md` (front matter only; `slug_key` is the data file name) and sponsors use their `/sponsors/<name>/` page. The stub pages are removed from the production image after indexing. When you add a pick, add its stub too; the build fails if a stub has no matching data.

#### Deployment

Deployment is done with Github Actions, see workflow file in `.github/workflows/deploy-prod.yml`
Expand Down
6 changes: 6 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ paginate = 12
url = "/contact/"
weight =110

[[Menu.Main]]
name = "Search"
identifier = "search"
url = "/search/"
weight =120

# Footer Menu (left)
[[Menu.FooterLeft]]
name = "PeerTube"
Expand Down
6 changes: 6 additions & 0 deletions content/search-index/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "search-index"
_build:
render: never
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/actual-budget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "actual-budget"
type: search-index
slug_key: actual-budget
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/add-water.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "add-water"
type: search-index
slug_key: add-water
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/alttp-vt-randomizer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "alttp-vt-randomizer"
type: search-index
slug_key: alttp-vt-randomizer
_build:
list: never
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "atv-desktop-remote-a-simple-app-to-allow-you-to-control-an-apple-tv-from-your-desktop"
type: search-index
slug_key: atv-desktop-remote-a-simple-app-to-allow-you-to-control-an-apple-tv-from-your-desktop
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/bitchat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "bitchat"
type: search-index
slug_key: bitchat
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/bpftune.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "bpftune"
type: search-index
slug_key: bpftune
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/cavalier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "cavalier"
type: search-index
slug_key: cavalier
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/cdemu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "cdemu"
type: search-index
slug_key: cdemu
_build:
list: never
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "chat-gipitty-terminal-client-for-getting-answers-from-llms"
type: search-index
slug_key: chat-gipitty-terminal-client-for-getting-answers-from-llms
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/cheat.sh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "cheat.sh"
type: search-index
slug_key: cheat.sh
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/direnv-vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "direnv-vscode"
type: search-index
slug_key: direnv-vscode
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/dockercomposemaker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "dockercomposemaker"
type: search-index
slug_key: dockercomposemaker
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/dotfiles-installer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "dotfiles-installer"
type: search-index
slug_key: dotfiles-installer
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/duf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "duf"
type: search-index
slug_key: duf
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/easyeffects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "easyeffects"
type: search-index
slug_key: easyeffects
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/eilmeldung-tui-rss-reader.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "eilmeldung-tui-rss-reader"
type: search-index
slug_key: eilmeldung-tui-rss-reader
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/element.fm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "element.fm"
type: search-index
slug_key: element.fm
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/eloquent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "eloquent"
type: search-index
slug_key: eloquent
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/etesync-knotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "etesync-knotes"
type: search-index
slug_key: etesync-knotes
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/ffshare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "ffshare"
type: search-index
slug_key: ffshare
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/garmindb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "garmindb"
type: search-index
slug_key: garmindb
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/gemini-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "gemini-cli"
type: search-index
slug_key: gemini-cli
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/gopher64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "gopher64"
type: search-index
slug_key: gopher64
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/hedgedoc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "hedgedoc"
type: search-index
slug_key: hedgedoc
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/hexecute-🪄.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "hexecute-🪄"
type: search-index
slug_key: hexecute-🪄
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/high-tide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "high-tide"
type: search-index
slug_key: high-tide
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/home-manager-webapps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "home-manager-webapps"
type: search-index
slug_key: home-manager-webapps
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/ignition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "ignition"
type: search-index
slug_key: ignition
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/isd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "isd"
type: search-index
slug_key: isd
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/jellify-music.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "jellify-music"
type: search-index
slug_key: jellify-music
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/junction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "junction"
type: search-index
slug_key: junction
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/kairpods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "kairpods"
type: search-index
slug_key: kairpods
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/kde-control-station.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "kde-control-station"
type: search-index
slug_key: kde-control-station
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/kopia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "kopia"
type: search-index
slug_key: kopia
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/kvaesitso.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "kvaesitso"
type: search-index
slug_key: kvaesitso
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/lazyssh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "lazyssh"
type: search-index
slug_key: lazyssh
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/leantime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "leantime"
type: search-index
slug_key: leantime
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/lemurs-🐒.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "lemurs-🐒"
type: search-index
slug_key: lemurs-🐒
_build:
list: never
---
7 changes: 7 additions & 0 deletions content/search-index/picks/lenspect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "lenspect"
type: search-index
slug_key: lenspect
_build:
list: never
---
Loading
Loading