1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 13:46:38 -04:00

absolute URLs in CSS via hugo variable

This commit is contained in:
2020-04-01 17:59:40 -04:00
parent e35b7282fe
commit 72c8b3a99a
2 changed files with 3 additions and 2 deletions

View File

@ -19,8 +19,8 @@
font-style: $style;
font-weight: $weight;
font-display: $display;
src: url("#{$src}.woff2") format("woff2"),
url("#{$src}.woff") format("woff"); // stylelint-disable-line indentation
src: url($base-url + $src + ".woff2") format("woff2"),
url($base-url + $src + ".woff") format("woff"); // stylelint-disable-line indentation
// Allow additional declarations to be passed in:
@content;

View File

@ -3,6 +3,7 @@
// all variables set by Hugo's config.toml must go here
// stylelint-disable
$max-width: {{ printf "%d%s" .Site.Params.pageMaxWidth "px" }};
$base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}/"; // consistent trailing forward slash
// stylelint-enable
// Variables & Functions