getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.53k stars 945 forks source link

Failing zola build with option: "external_links_target_blank = true" #2548

Closed hannes-sistemica closed 3 months ago

hannes-sistemica commented 3 months ago

Bug Report

I have been running a static site without issues with Zola 0.18.0 and recently upgraded to 0.19.1. Then I got the error:

Error: Failed to build the site
Error: TOML parse error at line 12, column 1
   |
12 | external_links_target_blank = true
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
unknown field `external_links_target_blank`, expected one of `base_url`, `theme`, `title`, `description`, `default_language`, `languages`, `translations`, `generate_feeds`, `feed_limit`, `feed_filenames`, `hard_link_static`, `taxonomies`, `author`, `compile_sass`, `minify_html`, `build_search_index`, `ignored_content`, `ignored_static`, `mode`, `output_dir`, `preserve_dotfiles_in_output`, `link_checker`, `slugify`, `search`, `markdown`, `extra`

I temporarely disabled/commented out the line to get my page online, but obviously I would like to have external links opened in new pages (which is now disabled)

Environment

Zola version: 0.19.1

Expected Behavior

Page should have been build.

Current Behavior

See above, page does not built

Step to reproduce

Add "external_links_target_blank = true" to the config.toml

Keats commented 3 months ago

This means the field is currently at the top level while it should be nested in a [markdown] section in the config.

hannes-sistemica commented 3 months ago

Ok, thanks - didn't see that properly in docs. Was there a change, as it worked before? With that change it works!

Keats commented 3 months ago

It didn't change so I'm not sure how it worked with you since it was ignored. All that changed was erroring on unexpected fields in the config and front-matter