# How to you edit config.toml to include Mastodon

**URL:** <https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349>\
**Category:** Support\
**Created:** [October 29, 2024, 9:46am UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349 "2024-10-29T09:46:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffPorter](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/jeffporter/32/1250_2.png) [@JeffPorter](https://zola.discourse.group/u/JeffPorter)\
**Post date:** [October 29, 2024, 9:46am UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349/1 "2024-10-29T09:46:00Z")

</div>

Hi,

I’m trying to set up a Mastodon commenting system for Zola but I’ve fallen at the first hurdle. How do you include something like this in config.toml? This is what’s used in Hugo.

```auto
[params]
    [params.comment.fediverse]
    enable = true
    host = "mastodon.social"
    user = "wordius"

```

---

<div class="post-metadata">

**Author:** ![ShawnPConroy](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/shawnpconroy/32/1267_2.png) [@ShawnPConroy](https://zola.discourse.group/u/ShawnPConroy)\
**Post date:** [October 29, 2024, 12:00pm UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349/2 "2024-10-29T12:00:26Z")

</div>

Of course, Zola doesn’t support a Mastodon plugin itself. Though, I think you are asking where to save this, so your template can use it.

From the configuration doc page:

```auto
# You can put any kind of data here. The data
# will be accessible in all templates
# Example:
# [extra]
# author = "Famous author"
#
# author value will be available using {{ config.extra.author }} in templates
#
[extra]

```

You can, if you prefer, have subsections, such as:

```auto
[extra]

[extra.fediverse]
enable = true
host = "mastodon.social"
user = "wordius"

```

Which would be referenced as `{{ config.extra.fediverse.user }}` in a template. Or `config.extra.fediverse.enable`.

I don’t have much experience with Hugo, but I guess `params` is similar to `extra`, if `params` are for the entire site.

---

<div class="post-metadata">

**Author:** ![JeffPorter](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/jeffporter/32/1250_2.png) [@JeffPorter](https://zola.discourse.group/u/JeffPorter)\
**Post date:** [October 29, 2024, 12:20pm UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349/3 "2024-10-29T12:20:27Z")

</div>

Thanks for the rapid response, @ShawnPConroy.

First hurdle is cleared. Just have to figure the rest of the code to use and the ids for the posts I create.

---

<div class="post-metadata">

**Author:** ![ShawnPConroy](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/shawnpconroy/32/1267_2.png) [@ShawnPConroy](https://zola.discourse.group/u/ShawnPConroy)\
**Post date:** [October 29, 2024, 12:30pm UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349/4 "2024-10-29T12:30:49Z")

</div>

Do the IDs need to be integer numbers, or can they be strings? You can a portion of the URL, the published date, or will you need to have a manual `page_id` in the `[extra]` frontmatter of each page?

---

<div class="post-metadata">

**Author:** ![JeffPorter](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/jeffporter/32/1250_2.png) [@JeffPorter](https://zola.discourse.group/u/JeffPorter)\
**Post date:** [October 29, 2024, 12:48pm UTC](https://zola.discourse.group/t/how-to-you-edit-config-toml-to-include-mastodon/2349/5 "2024-10-29T12:48:16Z")

</div>

No, I mean the Mastodon toot’s ID.

From what I’m looking at, you need to add an ID for a toot, post publishing, and then re-publish the post. So I’d have front matter something like this with the ID added for the Fediverse (Mastodon) at the end:

```auto
+++ 
Title = Title
Date = date
Tags
Fediverse = 123445566667777

```
