solana-foundation / developer-content

Collection of Developer content for exploring, learning, and building in the Solana ecosystem.
https://solana.com/developers
84 stars 101 forks source link

Loading code in code component #170

Open jacobcreech opened 3 months ago

jacobcreech commented 3 months ago

Problem

For writing code within markdown, we're often writing it directly in it. This causes problems if we want to write tests on it later down the line.

Proposed Solution

Allow loading code from a separate file, much like vuepress's @/code so we can write a bunch of nightly tests later to check the up-to-dateness of our code.

nickfrosty commented 3 months ago

I love this idea. I have been toying with the idea of the inverse: being able to test the code within a code block that is directly in the markdown. But I think this vuepress style will be even easier to implement