You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostCSS (autoprefixing of CSS browser-prefixes) is not enabled when running in server mode (it is a little slow), so Chrome is the recommended choice for development.
51
+
52
+
PostCSS (autoprefixing of CSS browser-prefixes) is not enabled when running in
53
+
server mode (it is a little slow), so Chrome is the recommended choice for
54
+
development.
55
+
52
56
{{% /alert %}}
53
57
54
58
## Site colors
@@ -87,7 +91,9 @@ Learn how to modify maps, see [Maps and loops] and [Adding theme colors].
87
91
88
92
## Fonts
89
93
90
-
The theme uses [Open Sans](https://fonts.google.com/specimen/Open+Sans) as its primary font. To disable Google Fonts and use a system font, set this SCSS variable in `assets/scss/_variables_project.scss`:
94
+
The theme uses [Open Sans](https://fonts.google.com/specimen/Open+Sans) as its
95
+
primary font. To disable Google Fonts and use a system font, set this SCSS
96
+
variable in `assets/scss/_variables_project.scss`:
Note that if you decide to go with a font with different weights (in the built-in configuration this is `300` (light), `400` (medium) and `700` (bold)), you also need to adjust the weight related variables, i.e. variables starting with `$font-weight-`.
109
+
Note that if you decide to go with a font with different weights (in the
110
+
built-in configuration this is `300` (light), `400` (medium) and `700` (bold)),
111
+
you also need to adjust the weight related variables, i.e. variables starting
112
+
with `$font-weight-`.
104
113
105
114
## CSS utilities
106
115
107
-
For documentation of available CSS utility classes, see the [Bootstrap Documentation](https://getbootstrap.com/). This theme adds very little on its own in this area. However, we have added some color state CSS classes that can be useful in a dynamic context:
116
+
For documentation of available CSS utility classes, see the [Bootstrap
117
+
Documentation](https://getbootstrap.com/). This theme adds very little on its
118
+
own in this area. However, we have added some color state CSS classes that can
119
+
be useful in a dynamic context:
108
120
109
121
*`.-bg-<color>`
110
122
*`.-text-<color>`
111
123
112
-
You can use these classes, for example, to style your text in an appropriate color when you don't know if the `primary` color is dark or light, to ensure proper color contrast. They are also useful when you receive the color code as a [shortcode](/docs/adding-content/shortcodes/) parameter.
124
+
You can use these classes, for example, to style your text in an appropriate
125
+
color when you don't know if the `primary` color is dark or light, to ensure
126
+
proper color contrast. They are also useful when you receive the color code as a
@@ -133,7 +150,13 @@ When you use `.-bg-<color>`, the text colors will be adjusted to get proper cont
133
150
134
151
## Code highlighting with Chroma
135
152
136
-
With Hugo version 0.60 and higher, you can choose from a range of code block highlight and colour styles using [Chroma](https://github.com/alecthomas/chroma) that are applied to your fenced code blocks by default. If you copied a recent `hugo.toml` your site uses Tango (like this site), otherwise the Hugo default is Monokai. You can switch to any of the [available Chroma styles](https://xyproto.github.io/splash/docs/all.html) (including our Docsy default Tango) using your `hugo.toml`/`hugo.yaml`/`hugo.json`:
153
+
With Hugo version 0.60 and higher, you can choose from a range of code block
154
+
highlight and colour styles using [Chroma](https://github.com/alecthomas/chroma)
155
+
that are applied to your fenced code blocks by default. If you copied a recent
156
+
`hugo.toml` your site uses Tango (like this site), otherwise the Hugo default is
157
+
Monokai. You can switch to any of the [available Chroma
By default code highlighting styles are not applied to code blocks without a specified language, instead you get Docsy's default style of grey with black text. If you would like the code highlighting style to apply to all code blocks, even without a language, uncomment or add the following line under `[markup.highlight]` in your `hugo.toml`/`hugo.yaml`/`hugo.json`.
196
+
By default code highlighting styles are not applied to code blocks without a
197
+
specified language, instead you get Docsy's default style of grey with black
198
+
text. If you would like the code highlighting style to apply to all code blocks,
199
+
even without a language, uncomment or add the following line under
200
+
`[markup.highlight]` in your `hugo.toml`/`hugo.yaml`/`hugo.json`.
When this option is enabled your site uses [Prism](https://prismjs.com/index.html) instead of Chroma for code block highlighting.
249
+
When this option is enabled your site uses
250
+
[Prism](https://prismjs.com/index.html) instead of Chroma for code block
251
+
highlighting.
221
252
222
-
Prism is a popular open source syntax highlighter which supports over 200 [languages](https://prismjs.com/index.html#supported-languages) and various [plugins](https://prismjs.com/index.html#plugins).
253
+
Prism is a popular open source syntax highlighter which supports over 200
254
+
[languages](https://prismjs.com/index.html#supported-languages) and various
Docsy includes JavaScript and CSS files for a basic Prism configuration, which supports:
257
+
Docsy includes JavaScript and CSS files for a basic Prism configuration, which
258
+
supports:
225
259
226
260
* Code blocks styled with the Prism `Default` theme
227
261
* Copy to clipboard buttons on code blocks
228
-
* Syntax highlighting for a number of common languages, as specified in the following Prism download link, [Customize your download][prismjs-download+].
262
+
* Syntax highlighting for a number of common languages, as specified in the
263
+
following Prism download link, [Customize your download][prismjs-download+].
By default, Prism code highlighting styles are not applied to code blocks without a specified language, instead you get Docsy's default style of grey with black text. To apply Prism styling to code blocks with no language or a language not supported by Prism, specify `none` as the language after your triple backticks.
269
+
By default, Prism code highlighting styles are not applied to code blocks
270
+
without a specified language, instead you get Docsy's default style of grey with
271
+
black text. To apply Prism styling to code blocks with no language or a language
272
+
not supported by Prism, specify `none` as the language after your triple
273
+
backticks.
235
274
236
275
### Extending Prism for additional languages or plugins
237
276
238
-
If the included Prism configuration is not sufficient for your requirements, and you want to use additional languages or plugins you can replace the included files with your own.
277
+
If the included Prism configuration is not sufficient for your requirements, and
278
+
you want to use additional languages or plugins you can replace the included
279
+
files with your own.
239
280
240
281
1. Download your own Prism JS and CSS files from <https://prismjs.com/download.html>
241
282
2. Replace the included Prism JS and CSS with the files you downloaded:
@@ -343,8 +384,9 @@ Docsy applies the following styles to all tables, through the class `.td-table`:
343
384
- `display: block`, which is necessary for tables to be responsive.
344
385
345
386
This styling configuration gives you responsive tables using Markdown only,
346
-
without the need to wrap the table in a `<div>`. It does, however, mean that all your tables have `display`
347
-
set to `block`. If you don't want this, you can create your own custom styles for tables.
387
+
without the need to wrap the table in a `<div>`. It does, however, mean that all
388
+
your tables have `display` set to `block`. If you don't want this, you can
389
+
create your own custom styles for tables.
348
390
349
391
{{% alerttitle="Note" %}}
350
392
@@ -385,24 +427,34 @@ The example above uses [Markdown attribute][] syntax, and might render like this
385
427
386
428
### Add code to head or before body end
387
429
388
-
If you need to add some code (CSS import, cookie consent, or similar) to the `head` section on every page, add the `head-end.html` partial to your project:
430
+
If you need to add some code (CSS import, cookie consent, or similar) to the
431
+
`head` section on every page, add the `head-end.html` partial to your project:
389
432
390
433
```
391
434
layouts/partials/hooks/head-end.html
392
435
```
393
436
394
-
And add the code you need in that file. Your partial code is automatically included just before the end of the theme partial [`head.html`](https://github.com/google/docsy/blob/main/layouts/partials/head.html). The theme version of [`head-end.html`](https://github.com/google/docsy/blob/main/layouts/partials/hooks/head-end.html) is empty.
437
+
And add the code you need in that file. Your partial code is automatically
Similarly, if you want to add some code right before the `body` end, create your own version of the following file:
445
+
Similarly, if you want to add some code right before the `body` end, create your
446
+
own version of the following file:
398
447
399
448
```
400
449
layouts/partials/hooks/body-end.html
401
450
```
402
451
403
-
Any code in this file is included automatically at the end of the theme partial [`scripts.html`](https://github.com/google/docsy/blob/main/layouts/partials/head.html).
452
+
Any code in this file is included automatically at the end of the theme partial
Both `head.html` and `scripts.html` are then used to build Docsy's [base page layout](https://github.com/google/docsy/blob/main/layouts/_default/baseof.html), which is used by all the other page templates:
455
+
Both `head.html` and `scripts.html` are then used to build Docsy's [base page
0 commit comments