mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-06-29 11:42:15 -04:00
✨ Add asset fingerprinting and SRI
This commit is contained in:
@@ -23,9 +23,9 @@ Use one of the existing theme stylesheets as a template. You are free to define
|
||||
|
||||
## Overriding the stylesheet
|
||||
|
||||
Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to overrid the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `static/css/` folder.
|
||||
Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to overrid the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `assets/css/` folder.
|
||||
|
||||
The `custom.css` file will be loaded automatically after all the other theme styles which means anything in your custom file will take precedence over the defaults.
|
||||
The `custom.css` file will be minified by Hugo and loaded automatically after all the other theme styles which means anything in your custom file will take precedence over the defaults.
|
||||
|
||||
## Building from source
|
||||
|
||||
@@ -47,18 +47,16 @@ To allow for easy theme colour changes, Congo defines a three-colour palette tha
|
||||
|
||||
For a full list of colours available, and their corresponding configuration values, see the official [Tailwind docs](https://tailwindcss.com/docs/customizing-colors#color-palette-reference).
|
||||
|
||||
After editing the configuration, you need to rebuild the theme's stylesheets.
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
This will automatically output a minified CSS file to `/themes/congo/static/css/main.css`.
|
||||
|
||||
To aid with testing style changes, you can also run the Tailwind JIT comiler in watch mode.
|
||||
After editing the configuration, you need to rebuild the theme's stylesheets. This will run the Tailwind JIT compiler in watch mode which aids with testing style changes.
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Now whenever you make a change, the (non-minified) CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Remember to perform a full build before publishing your website.
|
||||
This will automatically output a CSS file to `/themes/congo/assets/css/compiled/main.css`.
|
||||
|
||||
{{< alert >}}
|
||||
**Note:** You should make manual edits to the compiled CSS file.
|
||||
{{< /alert >}}
|
||||
|
||||
Now whenever you make a change, the CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Asset files will be minified by Hugo at site build time.
|
||||
|
||||
Reference in New Issue
Block a user