# rssLimit in config has no effect on index.xml

**URL:** <https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918>\
**Category:** support\
**Created:** [July 13, 2018, 5:05pm UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918 "2018-07-13T17:05:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![astreim](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@astreim](https://discourse.gohugo.io/u/astreim)\
**Post date:** [July 13, 2018, 5:05pm UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/1 "2018-07-13T17:05:37Z")

</div>

I am trying to switch from Wordpress to Hugo and setting up my first Hugo site using the theme ananke.

I added the line

rssLimit = 10

to my config.toml, but my index.xml is still very, very long and seems to mention all posts and pages.

Is this a bug (probably not) or am I missing something (probably)? Searched the forums and tried google, but found nothing which seems to work.

Any idea what I should or could do?

Regards  
Andreas

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/totallyinformation/32/5668_2.png) [@TotallyInformation](https://discourse.gohugo.io/u/TotallyInformation)\
**Post date:** [July 13, 2018, 8:18pm UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/2 "2018-07-13T20:18:12Z")

</div>

Working for me. You do have to put that setting before any array settings like

```auto
[permalinks]

```

That’s a limitation of the TOML format.

---

<div class="post-metadata">

**Author:** ![astreim](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@astreim](https://discourse.gohugo.io/u/astreim)\
**Post date:** [July 14, 2018, 11:40am UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/3 "2018-07-14T11:40:59Z")

</div>

Thank you, that worked.

I really had it after some array settings.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/totallyinformation/32/5668_2.png) [@TotallyInformation](https://discourse.gohugo.io/u/TotallyInformation)\
**Post date:** [July 14, 2018, 11:42am UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/4 "2018-07-14T11:42:52Z")

</div>

> [@astreim](#):
>
> I really had it after some array settings.

Yup, that caught me out when I was getting going a few months ago. That’s why I prefer YAML.

---

<div class="post-metadata">

**Author:** ![astreim](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@astreim](https://discourse.gohugo.io/u/astreim)\
**Post date:** [July 14, 2018, 11:45am UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/5 "2018-07-14T11:45:39Z")

</div>

Thanks, will check YAML out. The first configuration file I came over was TOML, so I sticked to it. Rookie me 😉

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [July 14, 2018, 1:15pm UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/6 "2018-07-14T13:15:37Z")

</div>

Picking TOML vs YAML boils down to personal preference. Both formats work robustly… it’s not “rookieness” to pick TOML. I use the TOML syntax, and prefer it over YAML and JSON.

Like any new syntax you come across, you just have to learn it. I’d suggest quickly skimming through the [TOML v0.4 spec/README](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) (v0.4 is used by Hugo, the latest version is 0.5).

The beauty (eye of the beholder) of TOML is that it is not whitespace/indentation sensitive; it is line-position sensitive. While YAML using indentation to define nesting (which I don’t like :)), TOML simple defines a table header, and then all table contents below that header line. I also prefer TOML’s syntax for multi-line strings, which looks like that in Python or Nim.

- [https://npf.io/2014/08/intro-to-toml/](https://npf.io/2014/08/intro-to-toml/)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/totallyinformation/32/5668_2.png) [@TotallyInformation](https://discourse.gohugo.io/u/TotallyInformation)\
**Post date:** [July 14, 2018, 2:22pm UTC](https://discourse.gohugo.io/t/rsslimit-in-config-has-no-effect-on-index-xml/12918/7 "2018-07-14T14:22:24Z")

</div>

> [@kaushalmodi](#):
>
> Picking TOML vs YAML boils down to personal preference. Both formats work robustly… it’s not “rookieness” to pick TOML. I use the TOML syntax, and prefer it over YAML and JSON.

Sorry, I should have made clear that I **do** use TOML for the main config file since that is what all of the documentation uses. I use YAML for all my post metadata though - this is also because I converted some of it from a previous Jekyll site which uses YAML as well.

I love the fact that Hugo doesn’t force you to choose one over the other.

> [@kaushalmodi](#):
>
> Like any new syntax you come across, you just have to learn it. I’d suggest quickly skimming through the [TOML v0.4 spec/README](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) (v0.4 is used by Hugo, the latest version is 0.5).

As an Information Management specialist, I don’t like tools that apply unnecessary and hidden restrictions. TOML can’t be used easily without knowing that one specific limitation. Hugo happens to be the _only_ tool I’ve ever come across that uses TOML.

You are absolutely correct of course though, this is down to personal preferences.

Also, when getting going with Hugo, it is not clear that you need to know something critical about TOML not to get caught out by this issue. Indeed, if you’ve never come across TOML before, how could you know? I never had to read a manual to use YAML 😉

> [@kaushalmodi](#):
>
> The beauty (eye of the beholder) of TOML is that it is not whitespace/indentation sensitive; it is line-position sensitive. While YAML using indentation to define nesting (which I don’t like :)), TOML simple defines a table header, and then all table contents below that header line. I also prefer TOML’s syntax for multi-line strings, which looks like that in Python or Nim.

Interesting that you should mention Python because, of course, YAML is much closer to Python than TOML. Given that Python is indentation-based. As it happened, Python was the first “modern” scripting language I learned (I don’t count PERL as modern). This means that I am much more comfortable with YAML than TOML and I find its terseness a lot more to my liking.

Again, though, just preferences. Depends where you started and the journey you took.

Well, just one last comment. It might be useful to add a footnote to the documentation on the config file about the vertical positioning issue with TOML since this does crop up from time to time.
