Skip to content

Commit 18a6dd2

Browse files
committed
Update task file
1 parent 99e014b commit 18a6dd2

3 files changed

Lines changed: 42 additions & 20 deletions

File tree

Taskfile.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ tasks:
2828
cmds:
2929
- cspell --config .config/cspell.yaml "content/**/*.md"
3030

31-
clean:
32-
desc: Delete the generated artifacts for this project.
33-
deps: [clean-cache]
34-
silent: true
35-
cmds:
36-
- echo "Cleaning up artifacts"
37-
- rm -r public
38-
- rm .hugo_build.lock
39-
4031
clean-cache:
4132
desc: Delete the Hugo Module cache for the current project.
4233
silent: true
4334
cmds:
4435
- echo "Cleaning Hugo module cache"
4536
- hugo mod clean --all
37+
- rm -f .hugo_build.lock
38+
39+
clean:
40+
desc: Delete the generated artifacts for this project.
41+
deps: [clean-cache]
42+
silent: true
43+
cmds:
44+
- echo "Cleaning up artifacts"
45+
- rm -rf public
4646

4747
update:
4848
desc: Updates project dependencies
@@ -55,6 +55,7 @@ tasks:
5555

5656
build:
5757
desc: Builds the website package
58+
deps: [clean]
5859
silent: true
5960
cmds:
6061
- echo "Running build task for {{.ENV}}"
@@ -93,15 +94,30 @@ tasks:
9394
cmds:
9495
- .github/workflows/scripts/index-now.sh
9596

96-
run:
97+
run-base:
9798
desc: Start local server. Receives ENV argument. `ENV=production` will run in production mode. `ENV=development will use development mode.
9899
silent: true
99-
vars:
100-
SETTINGS:
101-
map:
102-
common: "--bind 0.0.0.0 --printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates"
103-
development: "--buildDrafts --buildExpired --buildFuture --disableFastRender --navigateToChanged"
104-
production: "--gc --minify --templateMetrics --ignoreCache"
105100
cmds:
106101
- echo "=== Running in {{.ENV}} mode ==="
107-
- hugo server --environment {{.ENV}} {{index .SETTINGS .ENV}} {{index .SETTINGS "common"}}
102+
- hugo server --environment {{.ENV}} \
103+
--bind 0.0.0.0 \
104+
--printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates \
105+
{{.EXTRA_SETTINGS}}
106+
107+
run-dev:
108+
desc: Starts local server in development mode.
109+
deps: [clean]
110+
cmds:
111+
- task: run-base
112+
vars:
113+
ENV: development
114+
EXTRA_SETTINGS: "--buildDrafts --buildExpired --buildFuture --disableFastRender --navigateToChanged"
115+
116+
run-prod:
117+
desc: Starts a local server in production mode.
118+
deps: [clean, update]
119+
cmds:
120+
- task: run-base
121+
vars:
122+
ENV: production
123+
EXTRA_SETTINGS: "--gc --minify --templateMetrics --ignoreCache"

config/_default/params.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1+
blog:
2+
list:
3+
displayTags: true
4+
15
# Display the last modification date
26
displayUpdatedDate: true
7+
38
# Display the author of the last modification
49
displayUpdatedAuthor: true
510

611
editURL:
712
enable: true
813
base: "https://github.com/learn-software-engineering/website/edit/main"
914

10-
externalLinkDecoration: true
15+
externalLinkDecoration: false
1116

1217
imageZoom:
1318
enable: true
@@ -32,3 +37,6 @@ theme:
3237
# light | dark | system
3338
default: system
3439
displayToggle: true
40+
41+
toc:
42+
displayTags: true

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
github.com/imfing/hextra v0.12.0 h1:f6y35hW/WDJEcx9S0dOmbICOBxYE0PmP6IJFsTUgVyY=
2-
github.com/imfing/hextra v0.12.0/go.mod h1:YAv8XRNSmcqjieFwI7fVQK1AoY2Do+45DO9HGqxSGu4=
31
github.com/imfing/hextra v0.12.1 h1:3t1n0bmJbDzSTVfht93UDcfF1BXMRjeFojA071ri2l8=
42
github.com/imfing/hextra v0.12.1/go.mod h1:vi+yhpq8YPp/aghvJlNKVnJKcPJ/VyAEcfC1BSV9ARo=

0 commit comments

Comments
 (0)