Skip to content

Commit

Permalink
fix: keep main.css path
Browse files Browse the repository at this point in the history
  • Loading branch information
jgazeau committed Mar 27, 2023
1 parent 57d157b commit 8aef55e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ The several types of imports managed by the theme are the following ones:
| Import type | Comment |
| ----------- | ------- |
| **SASS files** (.sass) |{{< md >}}
* Imported in `<head>` tag as `<link rel="stylesheet" type="text/css">` after being [converted as CSS by Hugo](https://gohugo.io/hugo-pipes/transform-to-css/), grouped and minified in **main.css** file
* Imported in `<head>` tag as `<link rel="stylesheet" type="text/css">` after being [converted as CSS by Hugo](https://gohugo.io/hugo-pipes/transform-to-css/), grouped and minified in **css/main.css** file
* Paths used for the SASS➔CSS conversion :
* assets/bulma
* assets/sass
* assets/sass/theme
* assets/sass/custom
{{< /md >}}|
| **CSS files** (.css) |{{< md >}}
* Imported file by file in `<head>` tag as `<link rel="stylesheet" type="text/css">` and minified
Expand Down
3 changes: 0 additions & 3 deletions exampleSite/content/english/theme/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ The following files are managed within the theme:
* **assets/sass/custom/custom_pre_variables.sass** to override [bulma variables](https://bulma.io/documentation/customize/variables/) as well as [primary theme variables](https://github.com/jgazeau/shadocs/blob/main/assets/sass/theme/pre_variables.sass)
* **assets/sass/custom/custom_variables.sass** to override [secondary theme variables](https://github.com/jgazeau/shadocs/blob/main/assets/sass/theme/variables.sass)

{{< alert type="warning" >}}
If specific SASS customization is choosed, all custom files must exist (and left empty if nothing has to be overriden) within the **assets/sass/custom** folder (e.g. [documentation website SASS assets folder](https://github.com/jgazeau/shadocs/tree/main/exampleSite/assets/sass/custom))
{{< /alert >}}
{{< alert type="info" >}}
For more information, check the documentation website [custom_variables.sass](https://github.com/jgazeau/shadocs/blob/main/exampleSite/assets/sass/custom/custom_variables.sass) and [example.sass](https://github.com/jgazeau/shadocs/blob/main/exampleSite/assets/sass/custom/example.sass), to implement specific CSS behavior:
### Specific title color for custom SASS example {#sass_custom_example}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ Les différents types d'imports gérés par le thème sont les suivants:
| Type d'import | Commentaire |
| ------------- | ----------- |
| **Fichiers SASS** (.sass) |{{< md >}}
* Importés dans la balise `<head>` en tant que `<link rel="stylesheet" type="text/css">` après avoir été [convertis en CSS par Hugo](https://gohugo.io/hugo-pipes/transform-to-css/), regroupés et minifiés dans un fichier **main.css**
* Importés dans la balise `<head>` en tant que `<link rel="stylesheet" type="text/css">` après avoir été [convertis en CSS par Hugo](https://gohugo.io/hugo-pipes/transform-to-css/), regroupés et minifiés dans un fichier **css/main.css**
* Les chemins utilisés pour la conversion SASS➔CSS:
* assets/bulma
* assets/sass
* assets/sass/theme
* assets/sass/custom
{{< /md >}}|
| **Fichiers CSS** (.css) |{{< md >}}
* Importés fichier par fichier dans la balise `<head>` en tant que `<link rel="stylesheet" type="text/css">` et minifiés
Expand Down
3 changes: 0 additions & 3 deletions exampleSite/content/french/theme/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ Les fichiers suivants sont gérés dans le thème:
* **assets/sass/custom/custom_pre_variables.sass** pour surcharger les [variables bulma](https://bulma.io/documentation/customize/variables/) de même que les [variables primaires du thème](https://github.com/jgazeau/shadocs/blob/main/assets/sass/theme/pre_variables.sass)
* **assets/sass/custom/custom_variables.sass** pour surcharger les [variables secondaires du thème](https://github.com/jgazeau/shadocs/blob/main/assets/sass/theme/variables.sass)

{{< alert type="warning" >}}
Si la personnalisation SASS est choisie, tout les fichiers specifiques doivent exister (et laissés vide si rien ne doit être surchargé) dans le dossier **assets/sass/custom** (e.g. [dossier des assets du site de documentation](https://github.com/jgazeau/shadocs/tree/main/exampleSite/assets/sass/custom))
{{< /alert >}}
{{< alert type="info" >}}
Pour plus d'information, se référer au fichier du site de documentation [custom_variables.sass](https://github.com/jgazeau/shadocs/blob/main/exampleSite/assets/sass/custom/custom_variables.sass) et [example.sass](https://github.com/jgazeau/shadocs/blob/main/exampleSite/assets/sass/custom/example.sass), pour implémenter un comportement CSS spécifique:
### Couleur de titre spécifique pour exemple de personnalisation SASS {#sass_custom_example}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/theme/includes-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{- range .this | uniq -}}
{{- $filesArray = $filesArray | append (resources.Get .) -}}
{{- end -}}
{{- $options := (dict "outputStyle" "compressed") -}}
{{- $options := (dict "outputStyle" "compressed" "targetPath" "css/main.css") -}}
{{- $cssFile := $filesArray | resources.Concat "sass/theme/bundle.sass" | resources.ToCSS $options -}}
<link
rel="stylesheet"
Expand Down

0 comments on commit 8aef55e

Please sign in to comment.