diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..a9017be --- /dev/null +++ b/NEWS.md @@ -0,0 +1,22 @@ +# risotto (development version) + +# risotto 0.2.0 + +* **Breaking change** – new framework for colour palettes: + * Palettes are defined using CSS variables following the [base16](https://github.com/chriskempson/base16) system + * Added 14 new palettes: `apprentice`, `base16-dark`, `base16-light`, `dracula`, `material`, `papercolor-dark`, `papercolor-light`, `solarized-dark`, `solarized-light`, `tender`, `tokyo-night-dark`, `tokyo-night-light`, `windows-95` and `windows-95-light`. + * The default palette is `base16-dark` + * The `mode` parameter is no longer needed + * If you were using one of the old named palettes (`gruvbox-dark` or `gruvbox-light`), the change will be seamless. + * If you were using a custom palette, you will need to redefine it using the new framework. See README for further details. +* Added a table of contents (thanks @dashv, #47) +* Added multilanguage support with a language switcher (thanks @bedefaced) +* Made the site header and nav wrap more efficiently on narrow screens (thanks @m-dev672, #32) +* Added a changelog + +# risotto 0.1.0 + +First named release, including: + +* `gruvbox-dark` and `gruvbox-light` colour palettes +* FontAwesome6 and Academicons icon sets diff --git a/README.md b/README.md index f0768d0..916601a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,15 @@ See `exampleSite/config.toml` for the theme-specific parameters you need to add ### Colour palettes -Colour palettes for the theme are defined using the [base16 system](https://github.com/chriskempson/base16): +risotto uses the [base16 framework](https://github.com/chriskempson/base16) to define colour schemes that can be used with the `theme.palette` parameter. +A selection of 16 palettes (10 dark, 6 light) are bundled with the theme: `apprentice`, `base16-dark`, `base16-light`, `dracula`, `gruvbox-dark`, `gruvbox-light`, `material`, `papercolor-dark`, `papercolor-light`, `solarized-dark`, `solarized-light`, `tender`, `tokyo-night-dark`, `tokyo-night-light`, `windows-95` and `windows-95-light`. +The default is `base16-dark`. + + + +The easiest way to use other base16 styles is to place .css file from https://github.com/monicfenga/base16-styles/tree/master/css-variables and place it in your `static/css/palettes` directory. + +Or to define a wholly custom theme, you will need to define the following CSS variables for the following base16 colours (see [base16-dark.css](blob/main/static/css/palettes/base16-dark.css) for an example): | Base | Default colour | Used for | Examples | | ---- | -------------- | -------- | -------- | @@ -63,3 +71,4 @@ Colour palettes for the theme are defined using the [base16 system](https://gith | 0F | Brown | | | For light mode palettes, the sequence of 00–07 should be reversed (light to dark, not dark to light). +Note that not all colours are currently used in the theme. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 7f899e5..be7f40c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -63,6 +63,15 @@ series = "series" [markup.goldmark.renderer] unsafe = true +[markup] + + # Table of contents + # Add toc = true to content front matter to enable + [markup.tableOfContents] + startLevel = 2 + endLevel = 3 + ordered = true + [privacy] [privacy.vimeo] diff --git a/layouts/_default/single.html b/layouts/_default/single.html index dee40d1..77abf32 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,6 @@ {{ if .Params.toc }} {{ end }}
@@ -21,4 +20,10 @@ {{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}

{{ end }} + + {{ if and (.Params.toc) (.TableOfContents) }} +
+ On this page: + {{ .TableOfContents }} + {{ end }} {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 47f032a..45c46ce 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,6 +1,6 @@ -

{{ .Site.Title }}