Skip to content

Import code examples from files for website #7

@dannywillems

Description

@dannywillems

Description

Website code examples should be imported from actual source files that are compiled, similar to how o1-labs/mina-rust handles documentation.

Current State

Code examples in doc/docs/*.md are inline and may become stale.

Desired State

  1. Create example files in a doc/examples/ directory
  2. Examples are compiled as part of CI
  3. Docusaurus imports from these files

Implementation Options

  1. Use Docusaurus code import feature: @include "../../examples/basic.rs"
  2. Use rustdoc and link to it
  3. Use a build script to inject code

References

  • o1-labs/mina-rust documentation approach

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions