# Zola 12 Config.toml

**URL:** <https://zola.discourse.group/t/zola-12-config-toml/593>\
**Category:** Support\
**Created:** [September 16, 2020, 11:36am UTC](https://zola.discourse.group/t/zola-12-config-toml/593 "2020-09-16T11:36:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 11:36am UTC](https://zola.discourse.group/t/zola-12-config-toml/593/1 "2020-09-16T11:36:04Z")

</div>

There is now sensitivity to order of config elements in the config.toml.

I just included some new Zola 12 search related config.toml attributes and the site failed to build.

Changing the order of the configuration, and the site now builds:

## config.toml order that will fail

```auto
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true
[search]
# Whether to include the title of the page/section in the index
include_title = true
# Whether to include the description of the page/section in the index
include_description = false
# Whether to include the rendered content of the page/section in the index
include_content = true
# At which character to truncate the content to. Useful if you have a lot of pages and the index would
# become too big to load on the site. Defaults to not being set.
truncate_content_length = 200
# a description; you can use markdown here if you like
description=""
default_language = "en"
highlight_theme = "solarized-light"
# New in Version 11 - Zola moved to default to atom.xml to to keep our old podcast names we need to use this config var
feed_filename = "rss.xml"
feed_limit = 75
generate_feed = true
# The taxonomies to be rendered for that site and their configuration
# Example:
taxonomies = [
    {name = "tags", feed = false, paginate_by = 6}, 
    {name = "english", feed = false, paginate_by = 6},  
    {name = "authors", feed = true, paginate_by = 2}, 
    {name = "downloads", feed = false, paginate_by = 8},
    {name = "podcast", feed = true, paginate_by = 75}, 
]
[extra]

```

## Console error message:

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola build -u https://adeptenglish.com -o ..\deployment\ZOLA12-Search
Building site...
-> Creating 178 pages (0 orphan), 6 sections, and processing 0 images
Failed to build the site
Error: Failed to render section 'C:/Users\Iria\Zola\production\content\_index.md'
Reason: Failed to render 'index.html'
Reason: Function call 'get_taxonomy_url' failed
Reason: `get_taxonomy_url` received an unknown taxonomy as kind: english

```

## config.toml that will work (just changed the order)

```auto
# New in Version 11 - Zola moved to default to atom.xml to to keep our old podcast names we need to use this config var
feed_filename = "rss.xml"
feed_limit = 75
generate_feed = true
# The taxonomies to be rendered for that site and their configuration
# Example:
taxonomies = [
    {name = "tags", feed = false, paginate_by = 6}, 
    {name = "english", feed = false, paginate_by = 6},  
    {name = "authors", feed = true, paginate_by = 2}, 
    {name = "downloads", feed = false, paginate_by = 8},
    {name = "podcast", feed = true, paginate_by = 75}, 
]
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true
[search]
# Whether to include the title of the page/section in the index
include_title = true
# Whether to include the description of the page/section in the index
include_description = false
# Whether to include the rendered content of the page/section in the index
include_content = true
# At which character to truncate the content to. Useful if you have a lot of pages and the index would
# become too big to load on the site. Defaults to not being set.
truncate_content_length = 200
[extra] 
...

```

## console output success:

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola build -u https://adeptenglish.com -o ..\deployment\ZOLA12-Search
Building site...
-> Creating 178 pages (0 orphan), 6 sections, and processing 0 images
Done in 23.8s.

```

## Observation

- It looks like some logic depends upon the taxonomies config variables being set before any search related functionality is started.

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 12:03pm UTC](https://zola.discourse.group/t/zola-12-config-toml/593/2 "2020-09-16T12:03:45Z")

</div>

If you add any config group

for example:

```auto
[slugify]
paths = "on"
taxonomies = "on"
anchors = "on"

```

above taxonomies:

```auto
taxonomies = [
    {name = "tags", feed = false, paginate_by = 6}, 
    {name = "english", feed = false, paginate_by = 6},  
    {name = "authors", feed = true, paginate_by = 2}, 
    {name = "downloads", feed = false, paginate_by = 8},
    {name = "podcast", feed = true, paginate_by = 75}, 
]

```

You will get random errors on building the site.

## This random error was:

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101
Building site...
Failed to load C:\Users\Iria\Zola\production\config.toml
Error: duplicate field `taxonomies` for key `slugify` at line 255 column 1

```

## observations

- Need to make clear in documentation that new config.toml is order sensitive
- Need to advise that changes to config.toml required for older versions?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 12:52pm UTC](https://zola.discourse.group/t/zola-12-config-toml/593/3 "2020-09-16T12:52:44Z")

</div>

That’s just TOML that sucks ☹
