Skip to content

Commit ec25f3f

Browse files
committed
fontsFolder
1 parent 26aae31 commit ec25f3f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

posts/lume-3.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -278,26 +278,31 @@ Or with a custom title
278278
<!-- <h1>New title</h1> -->
279279
```
280280

281-
## Global cssFile and jsFile
281+
## Global cssFile, jsFile and fontsFolder
282282

283283
As mentioned, Lume components can output CSS and JS code. However, some plugins
284284
output code too. For example, `google_fonts` generates the CSS code needed to
285285
load the fonts, `prism` and `code_highlight` export the CSS code with the
286-
themes, etc.
286+
themes, and `katex` (that didn't generate CSS code in Lume 2) now generates the
287+
CSS code automatically so you don't need to copy manually the CSS code.
288+
289+
Additionally, some plugins download also font files (specifically,
290+
`google_fonts` and `katex`).
287291

288292
In Lume 2, you have to configure how to export the generated code for every
289-
plugin individually. In Lume 3 there are two global options that will be used by
290-
default by all plugins and components:
293+
plugin individually. In Lume 3 there are three global options that will be used
294+
by default by all plugins and components:
291295

292296
```js
293297
const site = lume({
294298
cssFile: "/style.css", // default value
295299
jsFile: "/script.js", // default value
300+
fontsFolder: "/fonts", // default value
296301
});
297302
```
298303

299304
All extra code generated by components and the plugins `code_highlight`,
300-
`google_fonts`, `prism`, and `unocss` will store the code in these files.
305+
`google_fonts`, `prism`, `katex` and `unocss` will be stored there.
301306

302307
Of course, you can still change the code destination for a specific plugin:
303308

0 commit comments

Comments
 (0)