# Range skipping some items in front matter

**URL:** <https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500>\
**Category:** support\
**Created:** [March 5, 2022, 12:23am UTC](https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500 "2022-03-05T00:23:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon44707125](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon44707125](https://discourse.gohugo.io/u/anon44707125)\
**Post date:** [March 5, 2022, 12:23am UTC](https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500/1 "2022-03-05T00:23:09Z")

</div>

The code [in this tutorial](https://discourse.gohugo.io/t/getpage-from-url/36978/9) skips some items in the related variable. I have found one issue to be posts in a page bundle (with `index.md`) but I cannot figure out why it skips a few others. I have 5 posts in the related variable but even trying to add the code in different posts, those posts being skipped are also not appearing in the trial. I have even recreated those (two) specific posts afresh that are not in page bundle and still nothing!

Edit: I tested a few other articles outside a page bundle and some are also skipped. Any ideas? cc @jmooring

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [March 5, 2022, 6:48am UTC](https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500/2 "2022-03-05T06:48:53Z")

</div>

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See [https://discourse.gohugo.io/t/requesting-help/9132](https://discourse.gohugo.io/t/requesting-help/9132).

> Let us see your code
> 
> Include a **link to the source code repository** of your project, because we really need the _context_ of seeing your templates and partials to be able to help you. It is trivial to do a quick `git clone` on your repo, then run `hugo server` in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
> 
> If you can’t share your repository for whatever reason, consider creating a dummy repo that you _can_ share, which reproduces the problem you’re experiencing.

As a starting point, post your site configuration, but based on your description I think we’ll need to see everything.

---

<div class="post-metadata">

**Author:** ![anon44707125](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon44707125](https://discourse.gohugo.io/u/anon44707125)\
**Post date:** [March 5, 2022, 11:08am UTC](https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500/3 "2022-03-05T11:08:18Z")

</div>

I cannot replicate the issue in my dummy content site, hence why I haven’t shared a repo yet. But I think I have diagnosed the issue which I would like your input. Does the` related:` use file names or slug? I saw the missing content appears if I change the links from slug to the filename. For example, if a file name is `hugo.md` and the slug is `/hugo-md/`, changing the slug to filename in the related value makes the article appear. I have several articles where the file name is not the same as the slug. Ditto for a page bundle (bundle name different from slug).

Edit: The filename is indeed the solution here. But how to revert to using the slug instead? I rarely change the slug, but I shorten file names from time to time.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 9, 2022, 10:02am UTC](https://discourse.gohugo.io/t/range-skipping-some-items-in-front-matter/37500/4 "2022-03-09T10:02:35Z")

</div>

Closed on March 9, 2022, 10:02am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
