Giter Club home page Giter Club logo

Comments (1)

ty2k avatar ty2k commented on May 22, 2024

Our Gatsby implementation is using the official Gatsby plugin gatsby-remark-autolink-headers to generate heading IDs in Markdown source documents. Under the hood, that plugin is using github-slugger, which aims to match the GitHub heading ID generation functionality 1:1.

I've tested a handful of cases to see how special characters are treated, and I can confirm Gatsby and GitHub are generating identical IDs in these cases:

  • !? How do we deal with speci@l c#aracters??? becomes #-how-do-we-deal-with-specil-caracters
  • Some under_scores and da-shes for no good reason? becomes #some-under_scores-and-da-shes-for-no-good-reason
  • Very special characters like á,é,í,ó,ú,Á,É,Í,Ó,Ú,Ñ,ñ becomes #very-special-characters-like-áéíóúáéíóúññ

As such, we have no reason to be adding anchor tags manually to headings in our documentation.

I'm going to do the following to resolve this issue:

  • Remove all existing manual <a name=""> anchor tags in our Markdown documents, except in cases where they are being used for something other than a heading (I don't believe there are any edge cases like this, but I will take care to keep them in place if they are genuinely useful).
  • Updated the Tech Docs Writing Guide document to include guidance on this topic or change existing guidance.

from platform-developer-docs.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.