Skip to content

Commit

Permalink
Other updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jul 24, 2024
1 parent 9e2ab55 commit 45d1e4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
5 changes: 2 additions & 3 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{ $inServerMode := site.IsServer }}
{{ $includePaths := (slice "node_modules") }}
{{ $sass := "sass/style.sass" }}
{{ $cssOutput := "css/style.css" }}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{ $cssOpts := cond hugo.IsProduction $prodOpts $devOpts }}
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate $sass . | toCSS $cssOpts }}
{{ if $inServerMode }}
{{ if not hugo.IsProduction }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ else }}
{{ $prodCss := $css | fingerprint }}
Expand Down
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"scripts": {
"_build": "npm run _hugo-dev --",
"_hugox": "echo && echo \"FIXME: hugo should be run with --cleanDestinationDir\" && echo && hugo",
"_hugo": "hugo --cleanDestinationDir",
"_hugo-dev": "npm run _hugo -- -e dev -DF",
"_serve": "npm run _hugo-dev -- --minify --disableFastRender serve",
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
"build:production": "npm run _hugo -- --minify",
"build": "npm run _build --",
"clean": "rm -Rf node_modules public/* resources",
"make:public": "make -p public && git init -b main public",
"serve": "npm run _serve --",
"test": "npm run build"
},
"devDependencies": {
"bulma": "^0.9.4",
"hugo-extended": "^0.111.3"
}
},
"spelling": "cSpell:ignore bulma -"
}

0 comments on commit 45d1e4a

Please sign in to comment.