• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

241
Views
How to remove Accents (é,ç,ã,ò) in {{slug}} Netlify CMS

I have this in my config.yml:

slug: "{{slug}}"
    encoding: "ascii"
    clean_accents: true

But when my title is some like this (in PT-BR): “Doce de paçoca é bom!” I need this way: “doce-de-pacoca-e-bom” but I get this result on filename.md/url: “doce-de-paçoca-é-bom”. Any possible to remove this automatically without creating a field named slug and doing manually?

EDIT:

this is my config.yml, basically it is the backend of Netlify CMS.

backend:
  name: git-gateway
  branch: main
media_folder: "_site/assets/uploads/destaques"
public_folder: "/assets/uploads/destaques/"
collections:
  - name: "games" # Used in routes, e.g., /admin/collections/blog
    label: "Games" # Used in the UI
    folder: "store" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}"
    fields: # The fields for each document, usually in front matter
      - {label: "Layout", name: "layout", widget: "hidden", default: "layouts/store.njk"}
      - {label: "Id", name: "id", widget: "number"}
      - {label: "Youtube", name: "youtube", widget: "string", required: false}
      - {label: "Titulo", name: "title", widget: "string"}

The {{slug}} takes the Title label and make it url friendly, but i need to remove the accents and it do not remove...

have some titles that have words like "ç,á,é,ô..." but i need to remove it and replace to "c,a,e,o...".

almost 3 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error