• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

238
Vistas
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...".

over 2 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda