website-and-documentation/Taskfile.yml
Stephan Lo 3eaa574a26 docs(dev): add Taskfile and developer documentation
- Add Taskfile.yml with common development tasks
- Add go-task to devbox dependencies
- Create comprehensive README-developer.md covering:
  - Devbox setup and usage
  - Hugo and Docsy basics
  - Task commands reference
  - Development workflow
  - Content creation guide
  - Testing procedures
  - Troubleshooting tips
2025-10-23 14:13:31 +02:00

88 lines
1.5 KiB
YAML

version: '3'
vars:
HUGO_CMD: hugo
NPM_CMD: npm
tasks:
default:
desc: Show available tasks
cmds:
- task --list
# Build tasks
build:
desc: Build Hugo site
cmds:
- "{{.HUGO_CMD}} --gc --minify"
build:dev:
desc: Build Hugo site for development
cmds:
- "{{.HUGO_CMD}}"
serve:
desc: Start Hugo dev server
cmds:
- "{{.HUGO_CMD}} server"
clean:
desc: Clean build artifacts
cmds:
- rm -rf public resources/_gen .hugo_build.lock
# Test tasks
test:
desc: Run all tests
deps:
- test:build
- test:markdown
- test:html
- test:links
test:quick:
desc: Run quick tests (without link check)
deps:
- test:build
- test:markdown
test:build:
desc: Test Hugo build
cmds:
- "{{.HUGO_CMD}} --gc --minify --logLevel info"
test:markdown:
desc: Lint markdown files
cmds:
- "{{.NPM_CMD}} run test:markdown"
test:html:
desc: Validate HTML
cmds:
- "{{.NPM_CMD}} run test:html"
test:links:
desc: Check links
cmds:
- htmltest
# Development tasks
deps:install:
desc: Install all dependencies
cmds:
- "{{.NPM_CMD}} install"
- "{{.HUGO_CMD}} mod get -u"
- "{{.HUGO_CMD}} mod tidy"
deps:update:
desc: Update dependencies
cmds:
- devbox update
- "{{.NPM_CMD}} update"
- "{{.HUGO_CMD}} mod get -u"
# CI/CD
ci:
desc: Run CI pipeline locally
deps:
- test