Skip to content

Commit

Permalink
refactor: Switch to dart-sass
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Jun 19, 2024
1 parent c53b169 commit 9e6f134
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ public
resources
node_modules
out
static/fonts
static/assets
2 changes: 1 addition & 1 deletion Hydrunfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
# Frontend
if [ "$1" = "pwa" ]; then
# Install Hugo
apk add curl make hugo npm
apk add curl make hugo dart-sass npm

# Generate dependencies
make depend
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ clean:
depend:
npm i
find node_modules/@patternfly/patternfly/ -name "*.css" -type f -delete
rm -rf static/fonts
rm -rf static/assets
mkdir -p static
cp -r node_modules/@patternfly/patternfly/assets/fonts static
cp -r node_modules/@patternfly/patternfly/assets static
11 changes: 7 additions & 4 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
content="© {{ now.Year }} {{ .Site.Data.site.author }}"
/>

<link
rel="stylesheet"
href="{{ (resources.Get `scss/main.scss` | resources.ExecuteAsTemplate `main.scss` . | resources.ToCSS | resources.Minify).Permalink }}"
/>
{{ $opts := dict
"transpiler" "dartsass"
"includePaths" (slice "node_modules")
}}
{{ with resources.Get `scss/main.scss` | resources.ExecuteAsTemplate `main.scss` . | toCSS $opts | minify }}
<link rel="stylesheet" href="{{ .RelPermalink }}" />
{{ end }}
</head>
<body>
<div class="pf-c-page">
Expand Down

0 comments on commit 9e6f134

Please sign in to comment.