Fix: postcss config + checking that it works changing stuff in main.css
parent
05334d7887
commit
4278934bd6
|
@ -1,8 +1,8 @@
|
|||
/* Basic */
|
||||
/* @import 'https://fonts.googleapis.com/css2?family=Overpass+Mono:wght@400;700&display=swap';
|
||||
@import 'normalize.css';
|
||||
@import 'variables.css';
|
||||
@import 'common.css'; */
|
||||
@import 'https://fonts.googleapis.com/css2?family=Overpass+Mono:wght@400;700&display=swap';
|
||||
@import 'assets/css/normalize.css';
|
||||
@import 'assets/css/variables.css';
|
||||
@import 'assets/css/common.css';
|
||||
|
||||
/* Layout */
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
const themeDir = __dirname + '/../../';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('postcss-import')({
|
||||
path: [themeDir]
|
||||
}),
|
||||
require('postcss-custom-media')({
|
||||
path: [themeDir]
|
||||
}),
|
||||
require('postcss-nested')({
|
||||
path: [themeDir]
|
||||
}),
|
||||
]
|
||||
}
|
|
@ -10,10 +10,9 @@
|
|||
<title>{{- if .IsHome }}{{ .Site.Title }}{{- else }}{{ .Title }} · {{ .Site.Title }}{{- end }}</title>
|
||||
|
||||
<!-- CSS -->
|
||||
{{- $inServerMode := .Site.IsServer }}
|
||||
{{- $cssTarget := "css/style.css" }}
|
||||
{{- $cssOptions := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
|
||||
{{- $style := resources.Get "css/main.css" | toCSS $cssOptions }}
|
||||
{{- $inServerMode := .Site.IsServer }}
|
||||
{{ $options := dict "config" "assets/css/postcss.config.js" }}
|
||||
{{ $style := resources.Get "css/main.css" | resources.PostCSS $options }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
<link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}">
|
||||
{{ range .Site.Params.css -}}
|
||||
|
|
Loading…
Reference in New Issue