Strict Mode Syntax
ZiraDocs Strict Mode provides a formal and structured syntax for defining presentations. It uses explicit keywords and follows rigorous validation rules, making it 100% predictable for parsers and analysis tools. This mode is ideal when you need maximum precision and control over your presentation structure.
When to Use Strict Mode
Section titled “When to Use Strict Mode”✅ Recommended for:
- Programmatic generation of presentations
- Teams requiring consistent structure
- Complex presentations with multiple layouts
- Integration with automated workflows
- Maximum parser predictability
❌ Consider Flex Mode instead for:
- Quick content authoring
- Markdown-familiar writers
- Simple presentations
- Rapid prototyping
Core Concepts
Section titled “Core Concepts”- Explicit declarations: Every presentation element is defined with a keyword
- Clear hierarchy: Presentation structure is defined through nesting and specific blocks
- Strict validation: The ZiraDocs parser verifies compliance with language rules, helping prevent errors
- Layout awareness: Built-in support for specialized slide types with validation
Essential Keywords
Section titled “Essential Keywords”Defines a new slide with optional type or layout specification.
---mode: stricttitle: "My Presentation"---
SLIDE title heading: "Welcome to ZiraDocs" subtitle: "Structured presentations made simple" logo: "assets/logo.png"
SLIDE content title: "Main Content Slide" // Content elements go hereSlide Properties:
For title slides:
heading: Main title (alternative totitle)subtitle: Presentation subtitlelogo: Path to image file for logo
For all slides:
title: Slide title
Defines a paragraph text block with Markdown inline formatting support.
SLIDE content title: "Text Example" TEXT This is a paragraph with **bold text**, *italic text*, and `inline code`.
You can include [links](https://example.com) and multiple lines.POINTS
Section titled “POINTS”Defines a list of bullet points with automatic marker detection and nesting support.
SLIDE content title: "List Examples" POINTS - First point with dash - Second point - Nested sub-point - Another sub-point - Third main pointSupported List Types:
Bullet lists:
POINTS - Dash bullets * Asterisk bullets + Plus sign bulletsNumbered lists:
POINTS 1. First item 2. Second item 3. Third itemAlphabetical lists:
POINTS a. First option b. Second option c. Third optionMixed and nested lists:
POINTS 1. Main process a. Sub-step A b. Sub-step B 2. Second process - Important detail - Another detailDefines a code block with optional language specification for syntax highlighting.
SLIDE content title: "Code Example" CODE python def hello_world(): print("Hello, ZiraDocs Strict!") return "success"Available languages: javascript, python, typescript, go, java, c++, sql, yaml, json, html, css, bash, and more.
Inserts an image with optional caption and alt text.
SLIDE content title: "Image Example" IMAGE "assets/chart.png" "Sales performance chart" caption: "Q4 2024 sales results showing 25% growth"Creates structured tables with headers and data rows.
SLIDE content title: "Data Table" TABLE headers: ["Product", "Q3", "Q4", "Growth"] rows: [ ["Widget A", "$125K", "$156K", "+25%"], ["Widget B", "$89K", "$112K", "+26%"], ["Widget C", "$203K", "$234K", "+15%"] ] caption: "Product performance by quarter"Advanced Elements
Section titled “Advanced Elements”Charts and Visualizations
Section titled “Charts and Visualizations”Create interactive charts using Chart.js integration:
SLIDE content title: "Sales Performance" <<chart: bar>> data: [ ["Q1", 45, 32, 28], ["Q2", 52, 38, 35], ["Q3", 61, 45, 42], ["Q4", 73, 51, 48] ] series: ["Product A", "Product B", "Product C"] options: responsive: true plugins: title: display: true text: "Quarterly Sales by Product"Supported chart types: bar, line, pie, doughnut, combo, radar, scatter
Diagrams with Mermaid
Section titled “Diagrams with Mermaid”Create technical diagrams using Mermaid syntax:
SLIDE content title: "System Architecture" <<mermaid>> graph TD A[User] --> B[Frontend] B --> C[API Gateway] C --> D[Microservices] D --> E[Database]Interactive Maps
Section titled “Interactive Maps”Display maps with markers and geographic data:
SLIDE content title: "Global Presence" <<map>> type: world markers: - lat: 40.7128 lng: -74.0060 label: "New York" value: 45 - lat: 51.5074 lng: -0.1278 label: "London" value: 38 zoom: 2Grid Layout
Section titled “Grid Layout”Arrange content in side-by-side columns with a <<grid>> block. Each
<<column>> marker starts a new column; the grid closes with <<end>>. A
column’s body is written verbatim (Markdown-style content — headings, lists,
prose), and any lines before the first <<column>> become loose prose spanning
the whole grid.
SLIDE content title: "Two-Column Layout" <<grid>> <<column>> ## Left column - point one - point two <<column>> ## Right column Prose content on the right. <<end>>This is the strict-mode counterpart of the flex ::: grid / ::: column
form — both produce the same grid structure. <<end>> terminates the grid, so
any element after it (a TEXT, another block) is parsed independently.
Special Blocks
Section titled “Special Blocks”Create highlighted information blocks for different types of content:
SLIDE content title: "Important Information"
:::info 💡 **Information** This is an informational block for helpful tips. :::
:::warning ⚠️ **Warning** This is a warning block for important notices. :::
:::danger 🚨 **Danger** This is a critical alert block. :::
:::success ✅ **Success** This indicates successful completion. :::
:::tip 💡 **Pro Tip** Helpful advice for better workflow. :::Specialized Layouts
Section titled “Specialized Layouts”ZiraDocs Strict includes built-in support for specialized slide layouts with automatic validation:
title - Title Slide Layout
Section titled “title - Title Slide Layout”SLIDE title heading: "Main Presentation Title" subtitle: "Descriptive subtitle" logo: "assets/logo.png"content - General Content Layout
Section titled “content - General Content Layout”SLIDE content title: "Standard Content" TEXT Regular content with mixed elements. POINTS - First point - Second pointcomparison - Side-by-Side Comparison
Section titled “comparison - Side-by-Side Comparison”SLIDE comparison title: "Feature Comparison" :::info title: "Option A" content: "Features and benefits of first option" :::success title: "Option B" content: "Features and benefits of second option"stats - Data and Statistics
Section titled “stats - Data and Statistics”SLIDE stats title: "Performance Metrics" TABLE headers: ["Metric", "Q3", "Q4", "Change"] rows: [ ["Revenue", "$1.2M", "$1.8M", "+50%"], ["Users", "10K", "15K", "+50%"] ]code_example - Technical Documentation
Section titled “code_example - Technical Documentation”SLIDE code_example title: "API Implementation" TEXT Basic usage example: CODE javascript const api = new ZiraDocs.API(); const result = await api.build('presentation.slidelang');Layout Validation
Section titled “Layout Validation”ZiraDocs automatically validates that slide content matches its declared layout:
comparisonslides must have at least 2 comparable elementsstatsslides must include data tables, charts, or metricscode_exampleslides must contain at least one CODE blocktitleslides must have heading or title defined
If validation fails, the linter will show specific warnings to help you fix the issues.
Variables and Templating
Section titled “Variables and Templating”Use variables defined in your FrontMatter for dynamic content:
---mode: stricttitle: "Product Presentation"variables: product_name: "SuperWidget" version: "v2.0" release_date: "Q2 2025"---
SLIDE title heading: "Introducing {{product_name}} {{version}}" subtitle: "Available {{release_date}}"
SLIDE content title: "{{product_name}} Features" TEXT {{product_name}} includes powerful new capabilities in {{version}}.Slide Structure Example
Section titled “Slide Structure Example”Here’s a complete example showing proper slide structure:
---mode: stricttitle: "Complete Presentation Example"author: "ZiraDocs Team"variables: app_name: "ZiraDocs"---
SLIDE title heading: "Welcome to {{app_name}}" subtitle: "Structured presentations made simple" logo: "assets/logo.png"
SLIDE content title: "Key Features" TEXT {{app_name}} provides powerful features for creating professional presentations. POINTS - Explicit syntax for maximum control - Built-in validation and error checking - Support for complex layouts and elements - Interactive charts and diagrams
SLIDE code_example title: "Getting Started" TEXT Create your first slide with this simple syntax: CODE slidelang SLIDE content title: "My First Slide" TEXT Hello, world!
SLIDE stats title: "Usage Statistics" TABLE headers: ["Feature", "Adoption", "Satisfaction"] rows: [ ["Basic slides", "100%", "95%"], ["Advanced layouts", "78%", "92%"], ["Interactive elements", "45%", "98%"] ]Best Practices
Section titled “Best Practices”- Use descriptive slide titles - Every slide should have a clear, descriptive title
- Choose appropriate layouts - Match your slide layout to your content type
- Validate regularly - Run the linter frequently to catch issues early
- Structure your content - Use logical hierarchy with headings and bullet points
- Leverage variables - Use FrontMatter variables for repeated content
- Test your presentations - Verify that advanced elements render correctly
Migration from Flex Mode
Section titled “Migration from Flex Mode”If you’re migrating from Flex Mode, here are the key differences:
| Flex Mode | Strict Mode | Notes |
|---|---|---|
# Title |
SLIDE content title: "Title" |
Explicit slide declaration |
- List item |
POINTS - List item |
Explicit points block |
| Text paragraphs | TEXT block |
Explicit text declaration |
```code``` |
CODE block |
Explicit code block |
::: grid / ::: column |
<<grid>> / <<column>> / <<end>> |
Delimited grid block (see Grid Layout) |
Next Steps
Section titled “Next Steps”- Learn about Flex Mode for rapid content creation
- Explore FrontMatter for advanced configuration
- Check out Specialized Layouts for layout-specific features
- See Advanced Elements for charts, diagrams, and interactive content
For more examples and use cases, see the examples directory in the ZiraDocs repository.