NetlifyCMS filename

I don’t want my frontmatter title to be the actual filename. Nuxt Content v2 allows you to order docs based on number order. So, 1.about would display before everything else. With that said, Nuxt will generate the slug as /about, not /1.about

According to the NetlifyCMS docs, there is a filename field that can be included in the frontmatter. I expected whatever value I entered would end up being the actual filename. But, it has no effect.

So, is there a way to name files different than what is entered as the title?

Hi @djmtype

{{filename}} is a generated by Netlify CMS, not field you can set as mentioned here.

So how is it possible to set the filename different from the slug?

I’m not sure this is possible.

But you can customise the slug. For example this use the name and handle of the author as the slug

collections:
  - label: Author
    name: author
    folder: src/authors
    slug: "{{name.first}}-{{name.last}}-{{twitterHandle}}"
    create: true
    fields:
      - label: Name
        name: name
        widget: object
        fields:
          - label: First
            name: first
          - label: Last
            name: last
      - label: Twitter
        name: twitterHandle

Thus, if you have a section number field, and a title field, you could combine these to create a slug e.g. {{section_number}}.{{title}} such that if the section number was 1 and title about, the slug would become 1.about.

Thanks again for your help. I’ll give that a shot.