Skip to content

Macros Demonstration

This page demonstrates the use of the macros plugin in our documentation.

Using Variables

Welcome to {{ company_name }} internal documentation!

Current API version: {{ api_version }}
Latest release: {{ latest_release }}
Support contact: {{ support_email }}

Using Macros

Notes and Warnings

Note

This is an important note for developers.

Warning

Be careful when using this feature in production!

API Endpoints

Here are some example API endpoints:

GET /api/users List all users
POST /api/users Create a new user
GET /api/users/{id} Get user by ID
PUT /api/users/{id} Update user
DELETE /api/users/{id} Delete user

Conditional Content

This content is visible for other API versions

Loops

Available endpoints:

Method Path
GET /api/users
GET /api/projects
GET /api/teams
POST /api/users
POST /api/projects
POST /api/teams
PUT /api/users
PUT /api/projects
PUT /api/teams
DELETE /api/users
DELETE /api/projects
DELETE /api/teams

Custom CSS for API Endpoints

To make the API endpoints look better, add this to your stylesheets/extra.css:

.api-endpoint {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-family: monospace;
}

.api-endpoint .method {
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 8px;
}

.api-endpoint .path {
  font-weight: bold;
}

.api-endpoint .desc {
  color: #666;
  margin-left: 10px;
}

Created: June 10, 2025 04:12:20
Last update: June 10, 2025 04:12:20
Edit this page