Skip to content

Configure Templates

Before we can run Monstarillo, we need to configure the template paths for your local environment. This involves updating two key settings in the templates.json file.

📁 Required Setup

If you haven't already, clone the Monstarillo templates repository:

git clone https://github.com/monstarillo/monstarillo-templates
cd monstarillo-templates/tutorial-database-documenter

⚙️ Configuration Variables

We need to update two tags (configuration variables) in the templates.json file:

1. TemplateRoot

Purpose: Points to where your templates are located

Current value:

"value": "/home/patrick/code/templates"

Update to: The absolute path to your monstarillo-templates folder

{
  "tagName": "TemplateRoot",
  "value": "/Users/yourname/code/monstarillo-templates"
}
{
  "tagName": "TemplateRoot", 
  "value": "C:\\Users\\YourName\\code\\monstarillo-templates"
}

2. OutputPath

Purpose: Where generated files will be saved

Current value:

"value": "/home/patrick/code-gen-output/postgres-chinhook-db-md"

Update to: Any folder where you want the markdown files generated

{
  "tagName": "OutputPath",
  "value": "/Users/yourname/monstarillo-output"
}
{
  "tagName": "OutputPath",
  "value": "C:\\Users\\YourName\\monstarillo-output"
}

📝 Edit the Configuration

Open tutorial-database-documenter/templates.json in your editor and update both paths:

{
  "templates": [...],
  "tags": [
    {
      "tagName": "TemplateRoot",
      "value": "/path/to/your/monstarillo-templates"
    },
    {
      "tagName": "OutputPath", 
      "value": "/path/to/your/output/folder"
    }
  ]
}

Important Path Requirements

  • TemplateRoot: Must point to the root monstarillo-templates folder
  • OutputPath: Folder will be created if it doesn't exist
  • Use absolute paths (starting with / on Unix or C:\ on Windows)

✅ Verify Configuration

Test that your paths are correct:

# Check TemplateRoot points to template file
ls "[TemplateRoot]/tutorial-database-documenter/table.tmpl"

# Check OutputPath directory exists (create if needed)
mkdir -p "[OutputPath]"

🎯 What Gets Generated

After configuration, Monstarillo will:

  1. Read templates from: [TemplateRoot]/tutorial-database-documenter/
  2. Generate markdown files in: [OutputPath]/tables/
  3. Create one file per table with naming pattern: TableName.md

🚀 Next Steps

Configuration complete! Now let's explore what the templates actually do:

Explore Templates →