solana-foundation / developer-content

Collection of Developer content for exploring, learning, and building in the Solana ecosystem.

Home Page:https://solana.com/developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loading code in code component

jacobcreech opened this issue · comments

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.

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