Use the dartsass transpiler
This commit is contained in:
4
.github/workflows/pages.yml
vendored
4
.github/workflows/pages.yml
vendored
@@ -18,6 +18,8 @@ jobs:
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
- name: Setup Embedded Dart Sass
|
||||
run: sudo snap install dart-sass-embedded
|
||||
- id: pages
|
||||
name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
@@ -39,6 +41,8 @@ jobs:
|
||||
# submodules: recursive
|
||||
# - name: Setup Hugo
|
||||
# run: choco install hugo-extended
|
||||
# - name: Setup Embedded Dart Sass
|
||||
# run: choco install dart-sass-embedded
|
||||
# - name: Build
|
||||
# run: |
|
||||
# cd exampleSite
|
||||
|
12
README.md
12
README.md
@@ -77,13 +77,21 @@ please share it by [posting code or screenshots](https://github.com/willfaught/p
|
||||
$ brew install node
|
||||
```
|
||||
|
||||
3. Create a site:
|
||||
3. [Install Embedded Dart Sass](https://github.com/sass/dart-sass-embedded/releases).
|
||||
|
||||
For Homebrew on Mac:
|
||||
|
||||
```sh
|
||||
$ brew install sass/sass/dart-sass-embedded
|
||||
```
|
||||
|
||||
4. Create a site:
|
||||
|
||||
```sh
|
||||
$ hugo new site yourproject
|
||||
```
|
||||
|
||||
4. Create a post:
|
||||
5. Create a post:
|
||||
|
||||
```sh
|
||||
$ cd yourproject
|
||||
|
@@ -19,7 +19,7 @@
|
||||
{{ $resource := resources.ExecuteAsTemplate $href (or $page dict) . }}
|
||||
|
||||
{{ if $sass }}
|
||||
{{ $resource = $resource | toCSS (dict "enableSourceMap" $enablesourcemap "includePaths" $includepaths "outputStyle" $outputstyle) }}
|
||||
{{ $resource = $resource | toCSS (dict "enableSourceMap" $enablesourcemap "includePaths" $includepaths "outputStyle" $outputstyle "transpiler" "dartsass") }}
|
||||
{{ end }}
|
||||
|
||||
{{ $resource = $resource | minify | fingerprint }}
|
||||
|
Reference in New Issue
Block a user