Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add just serve-ts for testing over Tailscale
The default `just serve` binds to 127.0.0.1, which is fine on the
local machine but unreachable from other devices on the tailnet
(e.g. testing the site from a phone or another laptop).

`serve-ts [PORT]` resolves the host's Tailscale IPv4 via
`tailscale ip -4`, fails fast with a clear message if Tailscale
isn't running, prints the URL it's about to bind, and starts
`mkdocs serve` on that address. Defaults to port 8000.
  • Loading branch information
MasonEgger committed May 10, 2026
commit 451d226547a53cb753d813239e032bbcf34f4cf4
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ serve:
serve-port PORT="8001":
uv run mkdocs serve --dev-addr=127.0.0.1:{{PORT}}

# Run local development server bound to this machine's Tailscale IP (for testing from other tailnet devices)
serve-ts PORT="8000":
#!/usr/bin/env bash
set -euo pipefail
IP=$(tailscale ip -4 | head -n1)
if [ -z "$IP" ]; then
echo "Could not determine Tailscale IPv4 address. Is tailscale running?" >&2
exit 1
fi
echo "Serving on Tailscale IP: http://$IP:{{PORT}}"
uv run mkdocs serve --dev-addr="$IP:{{PORT}}"

# Check all links using lychee against the built site (builds first)
link-check: build
ln -sfn site 2026
Expand Down Expand Up @@ -53,6 +65,7 @@ help:
@echo " just install Install dependencies using uv"
@echo " just serve Start development server (port 8000)"
@echo " just serve-port 8001 Start dev server on specific port"
@echo " just serve-ts [PORT] Start dev server bound to Tailscale IP"
@echo ""
@echo "== Building & Validation =="
@echo " just build Build the documentation site"
Expand Down
Loading