feat(ui): add git version info display in header
- Display current branch/tag and commit hash in navbar center - Show dirty working directory indicator with yellow badge - Add automatic build info generation in Task workflow - Include build timestamp and user information - Style with responsive design (hidden on mobile) - Add .gitignore entries for generated build artifacts
This commit is contained in:
parent
69457ec964
commit
1d79ce85a5
8 changed files with 196 additions and 0 deletions
14
Taskfile.yml
14
Taskfile.yml
|
|
@ -15,6 +15,7 @@ tasks:
|
|||
desc: Build Hugo site
|
||||
deps:
|
||||
- deps:ensure-npm
|
||||
- build:generate-info
|
||||
cmds:
|
||||
- "{{.HUGO_CMD}} --gc --minify"
|
||||
|
||||
|
|
@ -22,13 +23,25 @@ tasks:
|
|||
desc: Build Hugo site for development
|
||||
deps:
|
||||
- deps:ensure-npm
|
||||
- build:generate-info
|
||||
cmds:
|
||||
- "{{.HUGO_CMD}}"
|
||||
|
||||
build:generate-info:
|
||||
desc: Generate build information (git commit, version, etc.)
|
||||
sources:
|
||||
- .git/HEAD
|
||||
- .git/refs/**/*
|
||||
generates:
|
||||
- data/build_info.json
|
||||
cmds:
|
||||
- ./scripts/generate-build-info.sh
|
||||
|
||||
serve:
|
||||
desc: Start Hugo dev server
|
||||
deps:
|
||||
- deps:ensure-npm
|
||||
- build:generate-info
|
||||
cmds:
|
||||
- "{{.HUGO_CMD}} server"
|
||||
|
||||
|
|
@ -56,6 +69,7 @@ tasks:
|
|||
desc: Test Hugo build
|
||||
deps:
|
||||
- deps:ensure-npm
|
||||
- build:generate-info
|
||||
cmds:
|
||||
- "{{.HUGO_CMD}} --gc --minify --logLevel info"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue