Git Product home page Git Product logo

Comments (4)

alexvoss avatar alexvoss commented on May 20, 2024

Hi,

the code highlighting is configurable. Which options have you tried and what did you not manage to achieve?

Please note that there is probably nothing to be done in Material for MkDocs per se. Either Pygments or Highlight.js would need to accept a change request. If you decide to contact them, please try to be more specific about what does not work for you and make sure to document what you have tried.

from mkdocs-material.

ValerioOniride avatar ValerioOniride commented on May 20, 2024

I haven't tried Highlight.js, im using this .yml configuration:
markdown_extensions:

  • pymdownx.highlight:
    anchor_linenums: true
    use_pygments: true
  • pymdownx.inlinehilite
  • pymdownx.snippets:
    base_path: ["overrides"]
  • pymdownx.blocks.admonition
  • pymdownx.arithmatex:
    generic: true
  • footnotes
  • pymdownx.blocks.details
  • pymdownx.superfences
  • pymdownx.mark
  • pymdownx.keys
  • attr_list
  • pymdownx.emoji:
    emoji_index: !!python/name:material.extensions.emoji.twemoji
    emoji_generator: !!python/name:material.extensions.emoji.to_svg

The issue i'm facing is that i don't like the result of the codeblock highlight, could you help me setting up highlight.js to make a test with?

from mkdocs-material.

alexvoss avatar alexvoss commented on May 20, 2024

All you need is in the documentation but since we don't have an example in our example repository yet, I just put one together. You need to change the code block to the language you want.

9.5.18-code-highlight-javascript-example.zip

from mkdocs-material.

squidfunk avatar squidfunk commented on May 20, 2024

Converting to discussion, since this is essentially a customization request.

from mkdocs-material.

Related Issues (20)

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.