//insert-chart
Charts from prose
Describe a chart in plain language → LLM produces a Vega-Lite spec → browser renders interactively.
::: /insert-chart ref@sales
Bar chart, X = quarter, Y = sales
Highlight Q4
:::
Charts, diagrams, illustrations and live widgets grow inline from natural-language description. One source, three audiences: humans read, LLMs generate, agents query.
Every Folio document ships data-folio-block markers and JSON-LD. Open this page in your favorite AI:
Describe a chart in plain language → LLM produces a Vega-Lite spec → browser renders interactively.
::: /insert-chart ref@sales
Bar chart, X = quarter, Y = sales
Highlight Q4
:::
Describe a flow → LLM produces Mermaid → browser renders.
::: /insert-flow
Login: enter → validate →
success to home / failure to error
:::
LLM picks a widget (filterable table, tabs, slider calc, accordion) and fills its config.
::: /insert-interactive ref@sales
Filterable + sortable sales table
:::
One MCP server config and your agent gets folio_build + folio_publish tool calls that return URLs.
{
"mcpServers": {
"folio": {
"command": "npx",
"args": ["@foliolang/cli/folio-mcp"]
}
}
}
CLI + local dev server. Write markdown, save, browser auto-reloads.
$ folio dev article.md
✓ http://localhost:5173
npm install -g @foliolang/cli# My article
::: /insert-flow
Login flow: enter → validate → success / fail
:::$ folio build article.md
✓ article.html