Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 1.58 KB

File metadata and controls

86 lines (61 loc) · 1.58 KB

Quickstart Guide

Create your first Tinkerdown app in 5 minutes.

Create a New App

tinkerdown new myapp
cd myapp

Project Structure

myapp/
├── index.md           # Your main page (markdown + interactive elements)
└── _data/             # Optional data files

Run the Development Server

tinkerdown serve

Open http://localhost:8080 in your browser.

Add Interactivity

Edit index.md to add interactive elements:

---
title: My First App
---

# Welcome to My App

<button name="SayHello">Click Me</button>

<div id="output">{{.message}}</div>

Add a Data Source

Define sources directly in your page's frontmatter:

---
title: Task List
sources:
  tasks:
    type: sqlite
    path: ./tasks.db
    query: SELECT * FROM tasks
---

# My Tasks

<table lvt-source="tasks" lvt-columns="id,title,status">
</table>

For Complex Configurations

If you have many sources or complex configurations shared across pages, you can use tinkerdown.yaml:

# tinkerdown.yaml (optional - for complex multi-page apps)
sources:
  tasks:
    type: sqlite
    path: ./tasks.db
    query: SELECT * FROM tasks
    cache:
      ttl: 5m
      strategy: stale-while-revalidate

See Configuration Reference for when to use tinkerdown.yaml.

Next Steps