To add an example, just create a val.
The val should start with a JSDoc style multi line comment that describes the example:
export const server = (
) =>
new Response(
"Hello world!")
The title is required.
Then, you can write the code.
Code can be prefixed with a comment that describes the code.
The comment will be rendered next to the code in the example page.
Make sure your val is public, then go to https://pomdtr-val_town_by_example.web.val.run/v/<your-username>/<your-val>
You can add another val to your example by adding an @include
directive
See @pomdtr/react_example
Adding external resources to your example
You can attach an external link to your val by using the @resource
directive. External resources are specified using a markdown link.
Adding examples to the homepage
Just add your val in @pomdtr/val_town_by_example_toc