Internal demos
This is an internal only page to demonstrate various ways to embed code into Markdown docs.
Syntax highlighting
Permalink to "Syntax highlighting"Just highlight some code, non-interactive. Uses the same renderer as playground, so highlight styles will match.
```js
html`<h1>Hello ${name}</h1>`
```
html`<h1>Hello ${name}</h1>`
Single file example
Permalink to "Single file example"One editable file from a project, with a preview right below.
Arguments:
- Path of the project dir from
samples/PATH/project.json
. - Filename from project to show.
Additional project.json
config options:
previewHeight
: Height of the preview in pixels (default120px
).
{% playground-example "v2-docs/templates/define" "my-element.ts" %}
Full IDE
Permalink to "Full IDE"Fully editable playground project, with preview to the side.
Arguments:
- (Required) Path of the project dir from
samples/PATH/project.json
.
{% playground-ide "v2-docs/templates/define" %}
Package versions
Permalink to "Package versions"Use extends
in your project.config
to inherit from the site base configuration that resolve imports to lit-next
:
{
"extends": "/samples/v2-base.json",
}