# Content adapters: normalized paths

**URL:** <https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908>\
**Category:** support\
**Tags:** content-adapters\
**Created:** [May 20, 2024, 9:57am UTC](https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908 "2024-05-20T09:57:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragan\_Espenschied](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dragan_espenschied/32/22111_2.png) [@Dragan\_Espenschied](https://discourse.gohugo.io/u/Dragan_Espenschied)\
**Post date:** [May 20, 2024, 9:57am UTC](https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908/1 "2024-05-20T09:57:58Z")

</div>

Hey folks,

In my `hugo.yaml` file I noted the configuration option  
`disablePathToLower: true`

In my `content` folder I’m using the following `_content.gotmpl` structure:

```auto
{{ range $.Site.Data.pages }}
    {{ $page := dict
        "kind" "page"
        "path" .id
        "title" .label
    }}
    {{
        $.AddPage $page
    }}
{{ end }}

```

The data source `pages.yaml` contains many records with the field of `id` set to a character string that contains upper and lower case characters.

However, on rendering, all resulting output file names in `public` are lowercased.

Am I setting the `path` portion of the page dictionary wrongly or is this a glitch that happens with the new Content Adapter feature?

* * *

Previously in this hugo project, I had used a nested Hugo projct to generade markdown files from the yaml data, and the resulting files names used to remain unchanged wrt character case.

I was so happy when Content Adapters were introduced, as they eliminate such a error-prone step in building the site, but I need to keep these URLs under control 🙂

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [May 20, 2024, 10:04am UTC](https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908/2 "2024-05-20T10:04:04Z")

</div>

The `path` gets normalised, see [Path | Hugo](https://gohugo.io/methods/page/path/)

You may want to look into the permalinks config and use something

> **[URL management](https://gohugo.io/content-management/urls/#tokens)**
>
> Control the structure and appearance of URLs through front matter entries and settings in your site configuration.

---

<div class="post-metadata">

**Author:** ![Dragan\_Espenschied](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dragan_espenschied/32/22111_2.png) [@Dragan\_Espenschied](https://discourse.gohugo.io/u/Dragan_Espenschied)\
**Post date:** [May 20, 2024, 11:04am UTC](https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908/3 "2024-05-20T11:04:20Z")

</div>

Thank you @bep !  
I was able to get the URLs I wanted by defining the `slug` key in the “virtual” front matter and using that for permalinks:

\_content.gotmpl

```auto
{{ range $.Site.Data.pages }}
    {{ $page := dict
        "kind" "page"
        "slug" .id
        "title" .label
    }}
    {{
        $.AddPage $page
    }}
{{ end }}

```

hugo.yaml

```auto
permalinks:
  page: 
    "/": "/:slug"

```

Funny enough, when using `:filename`, all pages are saved under `_content.html` 😉

---

<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:** [May 22, 2024, 11:05am UTC](https://discourse.gohugo.io/t/content-adapters-normalized-paths/49908/4 "2024-05-22T11:05:16Z")

</div>

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