Skip to content

Improve the documentation to auto retrieve the lines of code without having to pass them as strings #152

@MangelMaxime

Description

@MangelMaxime

In Fulma,

we are able to write the documentation using Markdown and automatically injecting the F# code for the examples.

It would be nice to do something similar for Feliz.Bulma, as it ensure that the code examples works.

We could in theory, write an equivalent to custom-loader.js for Vite but there is also this feature which seems easier to use.

It means that we will need to fetch the sources files when displaying the documentation but that should be fine because text is small often. We could create a helper `

Some experimentation was started in this branch.

Ideally, we would want to use a vite plugin to inline the string and avoid additional requests but I was not able to make a quick POC for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions