docusaurus

how to remove locale dropdown Icon(icon before english word)


I want to remove the icon in the language dropdown. I just want the text. Is that possible? locale dropdown


Solution

  • I am supposing that you are using the theme-classic.

    STEP by STEP:

    1. Open your Terminal/Power Shell at the root of your docusaurus.
    2. Run the command:

    npm run swizzle @docusaurus/theme-classic IconLanguage -- --danger

    1. Go to the folder .\src\theme\IconLanguage
    2. Edit the file index.js: remove the tag path inside the return statement — remove everything from <path to />
    3. Run your docusaurus

    REFERENCE

    https://docusaurus.io/feature-requests/p/make-the-language-changer-icon-configurable