Skip to content

Commit 6bbeaaa

Browse files
authored
Merge pull request #231 from egohygiene/copilot/add-working-hello-world-example
Add hello-world example to examples directory
2 parents c9677fb + d6c01dc commit 6bbeaaa

3 files changed

Lines changed: 78 additions & 0 deletions

File tree

examples/hello-world/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Hello World Example
2+
3+
A minimal end-to-end example showing how to use Renderflow to render a Markdown
4+
file into HTML.
5+
6+
## Files
7+
8+
| File | Description |
9+
|------|-------------|
10+
| `hello.md` | Sample Markdown input |
11+
| `renderflow.yaml` | Renderflow configuration (markdown → HTML) |
12+
13+
## Prerequisites
14+
15+
- [Renderflow](https://github.com/egohygiene/renderflow) installed and available on your `PATH`
16+
- [Pandoc](https://pandoc.org/installing.html) installed (required by Renderflow)
17+
18+
## Running the Example
19+
20+
From within this directory:
21+
22+
```bash
23+
renderflow build --config renderflow.yaml
24+
```
25+
26+
Or, because `renderflow.yaml` is the default config file name, you can simply run:
27+
28+
```bash
29+
renderflow build
30+
```
31+
32+
## Expected Output
33+
34+
After a successful build, the generated HTML file will be written to the `dist/`
35+
directory inside this example folder:
36+
37+
```
38+
examples/hello-world/
39+
├── dist/
40+
│ └── hello.html ← generated output
41+
├── hello.md
42+
├── renderflow.yaml
43+
└── README.md
44+
```
45+
46+
Open `dist/hello.html` in your browser to view the rendered document.
47+
48+
## Dry Run
49+
50+
To preview what Renderflow would do without writing any files:
51+
52+
```bash
53+
renderflow build --dry-run
54+
```

examples/hello-world/hello.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Hello, World!
2+
3+
Welcome to **Renderflow** – a spec-driven document rendering engine.
4+
5+
## Features
6+
7+
- Write documents in Markdown
8+
- Render to HTML, PDF, and DOCX
9+
- Configure everything via a single YAML file
10+
11+
## Getting Started
12+
13+
This is a minimal example demonstrating how Renderflow transforms a Markdown
14+
file into an HTML document with a single command.
15+
16+
```bash
17+
renderflow build --config renderflow.yaml
18+
```
19+
20+
Enjoy writing, and let Renderflow handle the rest! 🎉
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
input: "hello.md"
2+
output_dir: "dist"
3+
outputs:
4+
- type: html

0 commit comments

Comments
 (0)