# Documentation Generation


@include "templates/header.md"


Please generate documentation for the following code:


@include "examples/code-sample.md"


@include "templates/footer.md"
```

The `@include "filepath"` directive:

* Resolves file paths relative to the script’s directory
* Supports subdirectories: `@include "templates/header.md"`
* Replaces missing files with error comments
* Processes multiple includes in the same script

For more details, see the [Markdown Script Include](/genaiscript/reference/scripts/markdown-include) documentation.

## Parameters and Variables

[Section titled “Parameters and Variables”](#parameters-and-variables)

You can define script parameters in the frontmatter and reference them in the content:

translate.genai.md

```markdown
---
title: "Language Translator"
description: "Translates text to specified language"
parameters:
targetLanguage:
  type: "string"
  description: "Target language for translation"
  default: "Spanish"
tone:
  type: "string"
  description: "Translation tone"
  enum: ["formal", "casual", "technical"]
  default: "formal"
---