Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra syntaxes not working #1723

Closed
arnau opened this issue Jan 8, 2022 · 3 comments
Closed

Extra syntaxes not working #1723

arnau opened this issue Jan 8, 2022 · 3 comments

Comments

@arnau
Copy link

arnau commented Jan 8, 2022

Bug Report

Environment

Zola version: 0.15.2

Expected Behavior

I would expect a config.toml like:

[markdown]
extra_syntaxes = ["syntaxes"]

to load and apply the syntaxes in the syntaxes folder as described in the config documentation.

In case it helps:

Note that the exact code linked above works well with zola version 0.14.1.

Current Behavior

Both zola --root website serve and zola --root website build work as expected except for warnings such as:

Warning: Highlight language rfc8288 not found in notes/dive-into-the-link-header.md
Warning: Highlight language abnf not found in notes/dive-into-the-link-header.md

With the resulting HTML not highlighting codeblocks labelled as rfc8288 or abnf.

Step to reproduce

A simple zola serve on this minimal test should suffice.

@Keats
Copy link
Collaborator

Keats commented Jan 8, 2022

Ah the snippet hasn't been updated, it should be extra_syntaxes_and_themes as mentioned later on the page

@arnau
Copy link
Author

arnau commented Jan 8, 2022

Ah! I saw it, tried it on my website but didn't work and forgot to try it on the minimal test.

So, when I tried on my website it failed again so after digging a bit I found that if I add highlight_theme = "css" it fails again. I updated the repo with the small test which reproduces the issue.

@Keats Keats added the bug label Jan 9, 2022
jk-ozlabs added a commit to jk-ozlabs/zola that referenced this issue Jan 13, 2022
Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.

This change defers the theme = css check, so we still load syntaxes in
this case.

Fixes: getzola#1723

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
jk-ozlabs added a commit to jk-ozlabs/zola that referenced this issue Jan 13, 2022
Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.

This change defers the theme = css check, so we still load syntaxes in
this case.

Fixes: getzola#1723

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
@jk-ozlabs
Copy link
Contributor

Seeing the same issue here, and thought I'd have a go at fixing it. Let me know if you need any details.

Keats pushed a commit that referenced this issue Jan 15, 2022
Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.

This change defers the theme = css check, so we still load syntaxes in
this case.

Fixes: #1723

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Keats pushed a commit that referenced this issue Jan 22, 2022
Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.

This change defers the theme = css check, so we still load syntaxes in
this case.

Fixes: #1723

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
@Keats Keats closed this as completed in 1b20aca Jan 23, 2022
nyanpasu64 added a commit to nyanpasu64/zola that referenced this issue Jun 16, 2022
extra_syntaxes_and_themes is loaded from config.toml [markdown], and
used as both syntax and color theme search paths. Following the docs and
trying to set the extra_syntaxes property in config.toml [markdown] does
nothing, and getzola#1723 ran into this issue.

Change the docs to consistently reference extra_syntaxes_and_themes.
nyanpasu64 added a commit to nyanpasu64/zola that referenced this issue Jun 16, 2022
Currently the Configuration docs says to load syntax files into
config.toml [markdown] extra_syntaxes. However, ever since commit
23064f5 (released in Zola v0.15.0), the extra_syntaxes property was
replaced by extra_syntaxes_and_themes, and used as both syntax and color
theme search paths. Following the docs and trying to set the
extra_syntaxes property does nothing, and getzola#1723 ran into this issue.

Change the docs to consistently reference extra_syntaxes_and_themes.
Keats pushed a commit that referenced this issue Jun 16, 2022
Currently the Configuration docs says to load syntax files into
config.toml [markdown] extra_syntaxes. However, ever since commit
23064f5 (released in Zola v0.15.0), the extra_syntaxes property was
replaced by extra_syntaxes_and_themes, and used as both syntax and color
theme search paths. Following the docs and trying to set the
extra_syntaxes property does nothing, and #1723 ran into this issue.

Change the docs to consistently reference extra_syntaxes_and_themes.
thomasantony pushed a commit to thomasantony/zola that referenced this issue Sep 17, 2022
…zola#1732)

Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.

This change defers the theme = css check, so we still load syntaxes in
this case.

Fixes: getzola#1723

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants