Skip to content
New issue

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

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

Already on GitHub? # to your account

Requesting adding support for the Solidity language #2237

Open
Genesis3800 opened this issue Nov 15, 2023 · 2 comments
Open

Requesting adding support for the Solidity language #2237

Genesis3800 opened this issue Nov 15, 2023 · 2 comments
Labels
A-Highlighting Area: Code colored syntax highlighting C-enhancement Category: Enhancement or feature request

Comments

@Genesis3800
Copy link

Problem

Solidity is a popular language used to write smart contracts.
Projects in Web3 are starting to use Mdbook to document Solidity based frameworks.
For example: https://book.getfoundry.sh/

Highlight.js docs show that they support Solidity.

Proposed Solution

I propose that I be allowed to create a PR that adds native support for the Solidity language inside mdbook, so that folks don't have to use custom JS.

Notes

No response

@Genesis3800 Genesis3800 added the C-enhancement Category: Enhancement or feature request label Nov 15, 2023
@ehuss ehuss added the A-Highlighting Area: Code colored syntax highlighting label Feb 13, 2024
@MarcusWentz
Copy link

I found a work around for this.

Foundry Book supports Solidity syntax highlighting.

To copy this setup with a new mdbook project:

  1. In book.toml for your mdbook project, go to output.html to add additional-js with the following path:
[output.html]
additional-js = ["src/static/solidity.min.js"]
  1. Copy the solidity.min.js file in Foundry Book:
    https://github.com/foundry-rs/book/blob/master/src/static/solidity.min.js
    into the path just like Foundry Book for mdbook to load.

@Genesis3800
Copy link
Author

That's exactly what I ended up doing @MarcusWentz .
Back then I was big into solidity and set up a bit of a 'foundry book' of my own (https://www.solidity-in-foundry.com/index.html)

Took a lot of inspiration from the foundry book tbh.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-Highlighting Area: Code colored syntax highlighting C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

3 participants