Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langAlias for shiki #3223

Open
gitFoxCode opened this issue Mar 6, 2025 · 0 comments
Open

langAlias for shiki #3223

gitFoxCode opened this issue Mar 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@gitFoxCode
Copy link

Is your feature request related to a problem? Please describe

I have a blog where many different people write articles. When they use syntax highlighting, they often use aliases that don't work with Shiki, such as Dockerfile instead of docker

WARN  [@nuxtjs/mdc] Language "Dockerfile" is not loaded to the Shiki highlighter, fallback to plain text. Add the language to "mdc.highlight.langs" to fix this.

Describe the solution you'd like

Shiki has a solution for this problem, but it is not available for Nuxt Content or I'm somehow using it incorrectly

    highlight: {
      theme: "one-dark-pro",
      langs: ["json", "py", "shellscript", "sql", "markdown", "ini", "csv", "docker", "yaml"],
      langAlias: {
        "Dockerfile": "docker"
      }
    },
@gitFoxCode gitFoxCode added the enhancement New feature or request label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant