Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .docforge/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ content-files-formats:
- ".gif"
- ".ico"
- ".webmanifest"
- ".webp"
resources-download-path: content/__resources
github-oauth-env-map:
"github.com": GITHUB_OAUTH_TOKEN
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,26 @@ docker-preview:
install: ## Install npm dependencies
npm ci


OPTIMIZE_DIR ?= website
OPTIMIZE_MIN_KB ?= 200
OPTIMIZE_SKIP ?= favicon.png,favicon-16x16.png,favicon-32x32.png,favicon-96x96.png,apple-touch-icon.png,web-app-manifest-192x192.png,web-app-manifest-512x512.png,2025-07.png,og-gardener.png

.PHONY: optimize-assets
optimize-assets: ## Dry run: show which PNG images would be converted to WebP
node scripts/optimize-assets.mjs \
--dir $(OPTIMIZE_DIR) \
--min-kb $(OPTIMIZE_MIN_KB) \
--skip $(OPTIMIZE_SKIP)

.PHONY: optimize-assets-write
optimize-assets-write: ## Convert large PNG images to WebP and update references
node scripts/optimize-assets.mjs \
--dir $(OPTIMIZE_DIR) \
--min-kb $(OPTIMIZE_MIN_KB) \
--skip $(OPTIMIZE_SKIP) \
--write

.PHONY: dev
dev:
npx vitepress dev
Expand Down
Loading