Skip to content

langAlias for shiki #3223

@gitFoxCode

Description

@gitFoxCode

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"
      }
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions