Skip to content

You are viewing documentation for Instruqt 2.0 Labs - our upcoming product releasing in September 2026. For current Tracks documentation, please visitdocs.instruqt.com.

Page


Defined incontent.hcl

The page resource represents a markdown file that displays instructional content to users. Pages contain the actual content that users read during the lab, with support for variable substitution and embedded interactive activities.

As a lab author, you use page resources to create structured learning content:

  • Step-by-Step Instructions: Provide detailed, sequential instructions that guide users through complex procedures and learning objectives
  • Interactive Learning: Embed tasks, quizzes, and other activities directly within instructional content for immediate practice and assessment
  • Dynamic Content: Use variable substitution to personalize content with user-specific values, environment details, or configuration parameters

Pages form the instructional backbone of your lab, providing the knowledge and guidance users need to successfully complete hands-on activities.

resource "page" "name" {
title = "Getting Started"
file = "instructions/chapter1/intro.md"
}
resource "page" "name" {
title = "Getting Started"
file = "instructions/chapter1/intro.md"
variables = {
version = "v1.2.3"
api_url = "https://api.example.com"
region_name = "us-west-2"
}
activities = {
setup_task = resource.task.environment_setup
knowledge_check = resource.quiz.concepts_quiz
final_task = resource.task.deployment
}
}

Fields

FieldTypeRequiredDescription
titlestringPage title displayed in the UI
filestringPath to the markdown file containing page content
ConstraintsMust be a markdown file (.md extension)
variablesmap(string)Variables for template interpolation in the markdown content
activitiesmap(reference)task, quizActivity references mapped to IDs used in markdown

Computed Attributes

These attributes are set by the system and are read-only.

AttributeTypeDescription
contentstringProcessed markdown content (computed from file + variables + activities)

Pages support Handlebars template syntax for variable substitution:

## Welcome to {{service_name}}
Connect to the API at {{api_url}} using version {{version}}.
HelperDescriptionExample
quoteWraps value in quotes{{quote api_key}}“abc123”
trimRemoves whitespace{{trim description}}

Pages can embed interactive elements using the activities map. Activities are referenced by ID in markdown and must be defined in the page configuration.

Activity TypeReferenceDescription
taskTaskInteractive challenges with validation
quizQuizKnowledge assessments
resource "page" "tutorial" {
file = "instructions/tutorial.md"
activities = {
setup = resource.task.environment_setup
quiz = resource.quiz.knowledge_check
}
}

Reference activities in your markdown using the activity ID:

## Setup Your Environment
<instruqt-task id="setup"></instruqt-task>
## Test Your Knowledge
<instruqt-quiz id="quiz"></instruqt-quiz>
TagRequired ContentPurpose
<instruqt-task>Self-closing tag (no content)Embeds an interactive task
<instruqt-quiz>Self-closing tag (no content)Embeds a knowledge quiz
resource "page" "welcome" {
title = "Welcome to Docker"
file = "instructions/intro/welcome.md"
}
resource "page" "configuration" {
title = "API Configuration"
file = "instructions/reference/config.md"
variables = {
api_version = "v2"
endpoint = "https://api.example.com"
timeout = "30s"
}
}
resource "page" "hands_on" {
title = "Hands-On Practice"
file = "instructions/practice/exercises.md"
activities = {
docker_setup = resource.task.install_docker
container_task = resource.task.run_container
knowledge_quiz = resource.quiz.docker_concepts
}
}
resource "page" "advanced_tutorial" {
title = "Advanced Container Management"
file = "instructions/advanced/tutorial.md"
variables = {
registry_url = "registry.example.com"
namespace = "production"
image_tag = "v1.0.0"
}
activities = {
build_image = resource.task.build_custom_image
deploy_app = resource.task.deploy_application
scaling_quiz = resource.quiz.scaling_concepts
cleanup_task = resource.task.cleanup_resources
}
}
  1. Descriptive Titles: Use clear, descriptive titles that help users understand the page content
  2. Organized File Structure: Store markdown files in logical directory structures (e.g., instructions/chapter_name/page_name.md)
  3. Variable Naming: Use clear, consistent variable names that are easy to understand in templates
  4. Activity Flow: Order activities logically within the page content to guide user progression
  5. Content Length: Keep pages focused on specific topics - break long content into multiple pages
  6. Template Testing: Test variable substitution with different values to ensure templates work correctly