Skip to content

Commit

Permalink
Change: Allow sites to use local Sass files
Browse files Browse the repository at this point in the history
This processes ".scss" files in the "assets/css" directory, allowing
downstream sites to use Sass as well as plain CSS.
  • Loading branch information
alphapapa committed Nov 16, 2023
1 parent 10b7fa0 commit 9b86ccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/content/getstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Run `make html`. Output appears in `./public`.

Edit `config.yaml` to your liking.

To customize styling, add one or more `*.css` files to the `assets/css` directory.
To customize styling, add one or more `*.css` (or `*.scss` for Sass) files to the `assets/css` directory.
These files may make use of Hugo templating,
e.g. to access configuration variables as `{{ .Site.Params.somevar }}`.

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $page := . -}}

{{- $inServerMode := .Site.IsServer -}}
{{- $sass := (slice "theme-css/fresh/core.scss") -}}
{{- $sass := (slice "theme-css/fresh/core.scss") | append (resources.Match "css/*.scss") -}}
{{- $cssOpts := cond ($inServerMode) (dict "enableSourceMap" true) (dict "outputStyle" "compressed") -}}

<!-- Fonts -->
Expand All @@ -15,7 +15,7 @@
<link rel="stylesheet" href="{{ $fontUrl }}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">

<!-- SASS --- currently only for fresh -->
<!-- SASS -->
{{- range $sass -}}

{{- if $inServerMode -}}
Expand Down

0 comments on commit 9b86ccb

Please sign in to comment.