Skip to content

Commit b6f01f1

Browse files
committed
v1 of docs site.
1 parent b2a4621 commit b6f01f1

24 files changed

Lines changed: 564 additions & 571 deletions

docs/astro.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ export default defineConfig({
1313
label: 'Intro',
1414
autogenerate: { directory: 'intro' },
1515
},
16-
{
17-
label: 'Setup & installation',
18-
autogenerate: { directory: 'setup' },
19-
},
2016
{
2117
label: 'CLI',
2218
autogenerate: { directory: 'commands' },

docs/src/content/docs/authoring/blocks/Admonition.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: <Admonition>
33
---
44

5-
# `<Admonition>` Block
6-
75
The `<Admonition>` block creates callout boxes to highlight important information, warnings, notes, or tips. It helps draw the user's attention to critical information in your runbook.
86

97
## Basic Usage

docs/src/content/docs/authoring/blocks/BoilerplateInputs.md renamed to docs/src/content/docs/authoring/blocks/BoilerplateInputs.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: <BoilerplateInputs>
33
---
44

5-
# `<BoilerplateInputs>` Block
5+
import { Aside } from '@astrojs/starlight/components';
66

77
The `<BoilerplateInputs>` block creates dynamic web forms based on [Boilerplate](https://github.com/gruntwork-io/boilerplate) variable definitions. It's used to collect user input that can then be used in Commands, Checks, or to generate files from templates.
88

@@ -139,6 +139,10 @@ variables:
139139
140140
### Structured Map (with Schema)
141141
142+
<Aside type="note">
143+
This schema declaration is not supported by Boilerplate itself, but is supported by Runbooks.
144+
</Aside>
145+
142146
Map with predefined fields:
143147
144148
```yaml
@@ -164,6 +168,10 @@ variables:
164168
165169
## Validations
166170
171+
<Aside type="note">
172+
Some Boilerplate validation types are not supported by Runbooks.
173+
</Aside>
174+
167175
Boilerplate supports various validation types:
168176
169177
```yaml

docs/src/content/docs/authoring/blocks/BoilerplateTemplate.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
title: <BoilerplateTemplate>
33
---
44

5-
# `<BoilerplateTemplate>` Block
6-
7-
The `<BoilerplateTemplate>` block is an advanced component that renders Boilerplate templates inline without writing files to disk. This is useful for previewing generated content or debugging templates.
5+
The `<BoilerplateTemplate>` block renders Boilerplate templates inline or allows you to specify templates inline in your runbook. Like `<BoilerplateInputs>`, it uses the Boilerplate engine to generate files, but displays the rendered file directly in the markdown.
86

97
## Overview
108

11-
While `<BoilerplateInputs>` generates files and saves them to disk, `<BoilerplateTemplate>` renders templates in-memory and displays them in the UI. This is particularly useful when you want to:
9+
Both `<BoilerplateInputs>` and `<BoilerplateTemplate>` use the Boilerplate engine to generate files. The key differences are:
10+
11+
- **`<BoilerplateInputs>`**: Generates files and saves them to your workspace (persisted), can reference template directories
12+
- **`<BoilerplateTemplate>`**: Generates files, displays content inline, allows inline template specification
13+
14+
Use `<BoilerplateTemplate>` when you want to:
1215

1316
- Show users a preview of what will be generated
1417
- Display generated configuration inline
@@ -17,7 +20,7 @@ While `<BoilerplateInputs>` generates files and saves them to disk, `<Boilerplat
1720

1821
## Basic Usage
1922

20-
```mdx
23+
`````mdx
2124
<BoilerplateInputs id="config">
2225
```yaml
2326
variables:
@@ -29,7 +32,7 @@ variables:
2932
type: int
3033
description: Port number
3134
default: 8080
32-
\```
35+
```
3336
</BoilerplateInputs>
3437
3538
<BoilerplateTemplate boilerplateInputsId="config">
@@ -39,9 +42,9 @@ service:
3942
name: {{ .ServiceName }}
4043
port: {{ .Port }}
4144
enabled: true
42-
\```
43-
</BoilerplateTemplate>
4445
```
46+
</BoilerplateTemplate>
47+
`````
4548

4649
## Props
4750

@@ -57,9 +60,10 @@ service:
5760
## How It Works
5861

5962
1. User fills out the BoilerplateInputs form
60-
2. BoilerplateTemplate automatically re-renders the template with the current variable values
61-
3. Rendered content is displayed in the UI with syntax highlighting
62-
4. No files are written to disk
63+
2. BoilerplateTemplate automatically uses the Boilerplate engine to generate files with the current variable values
64+
3. Files are generated to temporary directories, read for display, then immediately cleaned up
65+
4. Generated content is displayed in the UI with syntax highlighting
66+
5. No files are persisted to your workspace (only shown in the UI)
6367

6468
## Examples
6569

@@ -249,10 +253,11 @@ resource "aws_instance" "app" {
249253

250254
| Feature | BoilerplateInputs | BoilerplateTemplate |
251255
|---------|------------------|---------------------|
252-
| Generates files | ✅ Yes (to disk) | ❌ No |
253-
| Shows preview | ❌ No | ✅ Yes |
256+
| Uses Boilerplate engine | ✅ Yes | ✅ Yes |
257+
| Generates files | ✅ Yes (persisted to workspace) | ✅ Yes (temporary, cleaned up) |
258+
| Shows preview in UI | ❌ No | ✅ Yes |
254259
| Can use with Commands | ✅ Yes | ✅ Yes (variables available) |
255-
| File tree output | ✅ Yes | ✅ Yes (preview only) |
260+
| File tree output | ✅ Yes (persisted) | ✅ Yes (preview only) |
256261
| Template directory | ✅ Supports | ❌ Inline only |
257262
| Auto-render | ✅ Yes (for Commands/Checks) | ✅ Yes |
258263

@@ -309,7 +314,7 @@ Display an entire configuration set:
309314
## Limitations
310315

311316
- Templates must be inline (cannot reference template directories like BoilerplateInputs can)
312-
- Files are not saved to disk
317+
- Generated files are not persisted to your workspace (only displayed in the UI)
313318
- Cannot include other template files (no `{{ template "file.txt" }}` support)
314319
- Best for simple, single-file templates or small sets of templates
315320

docs/src/content/docs/authoring/blocks/Check.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: <Check>
33
---
44

5-
# `<Check>` Block
6-
75
The `<Check>` block validates prerequisites and system state by running shell commands or scripts. It's essential for ensuring users have the right tools installed and their environment is properly configured before proceeding.
86

97
## Basic Usage

docs/src/content/docs/authoring/blocks/Command.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: <Command>
33
---
44

5-
# `<Command>` Block
6-
75
The `<Command>` block executes shell commands or scripts with variable substitution. It's used for performing operations like deployments, resource creation, and system configuration.
86

97
## Basic Usage

docs/src/content/docs/authoring/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Runbooks are written in **MDX** (Markdown with JSX), which means you can use all
1010

1111
## File Format
1212

13-
Runbooks use the `.mdx` file extension, though `.md` files with special blocks will also work. The file contains:
13+
Runbooks must be named `runbook.mdx` and use the MDX file format. The file contains:
1414

1515
1. **Standard Markdown** - Headers, paragraphs, lists, code blocks, images, links, etc.
1616
2. **Special Blocks** - React components like `<Check>`, `<Command>`, `<BoilerplateInputs>`, etc.

docs/src/content/docs/authoring/workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you're writing runbooks (not developing the Runbooks tool itself), the workfl
1010

1111
### 1. Create Your Runbook
1212

13-
Create a new `.mdx` file:
13+
Create a new `runbook.mdx` file:
1414

1515
```bash
1616
mkdir my-runbook

docs/src/content/docs/commands/open.md

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: open
3+
---
4+
5+
# `runbooks open`
6+
7+
Opens a runbook in your default browser with the interactive web interface.
8+
9+
## Usage
10+
11+
```bash
12+
runbooks open <path-to-runbook>
13+
```
14+
15+
## Arguments
16+
17+
- `<path-to-runbook>` - Path to the `runbook.mdx` file.
18+
19+
## What It Does
20+
21+
When you run `runbooks open`:
22+
23+
1. **Starts the Backend Server** - Launches a Go-based HTTP server on port 7825
24+
2. **Launches the Browser** - Opens your default web browser to `http://localhost:7825`
25+
3. **Serves the Frontend** - The web UI connects to the backend API to process the runbook
26+
4. **Keeps Running** - The server continues running until you close the browser or press Ctrl+C
27+
28+
## Troubleshooting
29+
30+
**Port already in use:**
31+
If port 7825 is already in use, you'll see an error. Stop any other process using that port or modify the code to use a different port.
32+
33+
**Browser doesn't open:**
34+
If the browser doesn't open automatically, you can manually navigate to `http://localhost:7825` after running the command.
35+
36+
**Browser window with the runbook doesn't open:**
37+
Sometimes, your browser seems to launch, but you don't see the Runbook. The most likely issue here is that your browser launched with multiple tabs and windows and your Runbooks tab is not visible. Either look through all your browser windows, or go directly to http://localhost:7825.
38+
39+
**Runbook not found:**
40+
Make sure the path points to a valid `runbook.mdx` file.
41+

0 commit comments

Comments
 (0)