Skip to content

Commit b513f1f

Browse files
committed
Add docs
1 parent e5a5f71 commit b513f1f

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

Diff for: CHANGELOG.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 0.20.0 (unreleased)
44

5+
- Add a `math` option in the `[markdown]` section in `config.toml` to render `$` and `$$` delimited math blocks. This is disabled by default.
6+
57
## 0.19.2 (2024-08-15)
68

79
- Fix some of YAML date parsing
@@ -72,7 +74,7 @@ feed_filenames)
7274
- `get_file_hash` is removed, use `get_hash` instead. Arguments do not change
7375
- Replace libsass by a Rust implementation: [grass](https://github.com/connorskees/grass). See https://sass-lang.com/documentation/breaking-changes
7476
for breaking changes with libsass: look for "beginning in Dart Sass"
75-
- Merge settings for the default language set in the root of `config.toml` and in the `[languages.{default_lang}]` section.
77+
- Merge settings for the default language set in the root of `config.toml` and in the `[languages.{default_lang}]` section.
7678
This will error if the same keys are defined multiple times
7779
- Code blocks content are no longer included in the search index
7880
- Remove built-ins shortcodes
@@ -193,9 +195,9 @@ any pages related to that taxonomy
193195
object
194196
3. Search settings are now language specific
195197
4. Translations are now nested in the languages table
196-
- Paths unification:
198+
- Paths unification:
197199
1. `get_url` does not load automatically from the `static` folder anymore
198-
2. New path resolving logic for all on-disk files: replace `@/` by `content/`, trim leading `/` and
200+
2. New path resolving logic for all on-disk files: replace `@/` by `content/`, trim leading `/` and
199201
search in $BASE_DIR + $path, $BASE_DIR + static + $path and $BASE_DIR + content + $path
200202
3. `get_file_hash` now returns base64 encoded hash by default
201203
4. all functions working on files can now only load files in the Zola directory
@@ -240,7 +242,7 @@ any pages related to that taxonomy
240242
- Add a `[markdown]` section to `config.toml` to configure rendering
241243
- Add `highlight_code` and `highlight_theme` to a `[markdown]` section in `config.toml`
242244
- Add `external_links_target_blank`, `external_links_no_follow` and `external_links_no_referrer`
243-
- Add a `smart_punctuation` option in the `[markdown]` section in `config.toml` to turn elements like dots and dashes
245+
- Add a `smart_punctuation` option in the `[markdown]` section in `config.toml` to turn elements like dots and dashes
244246
into their typographic forms
245247
- Add iteration count variable `nth` for shortcodes to know how many times a shortcode has been invoked in a given
246248
content
@@ -267,7 +269,7 @@ content
267269
### Breaking
268270

269271
- All paths like `current_path`, `page.path`, `section.path` (except colocated assets) now have a leading `/`
270-
- Search index generation for Chinese and Japanese has been disabled by default as it leads to a big increase in
272+
- Search index generation for Chinese and Japanese has been disabled by default as it leads to a big increase in
271273
binary size
272274

273275
### Other

Diff for: components/markdown/tests/markdown.rs

+9
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ fn can_use_smart_punctuation() {
133133
insta::assert_snapshot!(body);
134134
}
135135

136+
#[test]
137+
fn can_use_math() {
138+
let mut config = Config::default_for_test();
139+
config.markdown.math = true;
140+
let body =
141+
common::render_with_config(r#"Test inline $\sum_{e_k} \pi^i$ math."#, config).unwrap().body;
142+
insta::assert_snapshot!(body);
143+
}
144+
136145
#[test]
137146
fn can_use_external_links_options() {
138147
let mut config = Config::default_for_test();

Diff for: docs/content/documentation/getting-started/configuration.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ feed_filenames = ["atom.xml"]
8686
hard_link_static = false
8787

8888
# The default author for pages
89-
author =
89+
author =
9090

9191
# The taxonomies to be rendered for the site and their configuration of the default languages
9292
# Example:
@@ -142,6 +142,10 @@ external_links_no_referrer = false
142142
# For example, `...` into `…`, `"quote"` into `“curly”` etc
143143
smart_punctuation = false
144144

145+
# Whether math delimitered by `$` and `$$` are rendered into `<span class="math math-inline">`
146+
# and `<span class="math math-display">` respectively.
147+
math = false
148+
145149
# Whether to set decoding="async" and loading="lazy" for all images
146150
# When turned on, the alt text must be plain text.
147151
# For example, `![xx](...)` is ok but `![*x*x](...)` isn’t ok
@@ -210,7 +214,7 @@ index_format = "elasticlunr_javascript"
210214
[translations]
211215

212216
# Additional languages definition
213-
# You can define language specific config values and translations:
217+
# You can define language specific config values and translations:
214218
# title, description, generate_feeds, feed_filenames, taxonomies, build_search_index
215219
# as well as its own search configuration and translations (see above for details on those)
216220
[languages]

0 commit comments

Comments
 (0)