> For the complete documentation index, see [llms.txt](https://docs.privalo.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.privalo.dev/scripts/essentials/guidebook/config.md).

# CONFIG

| Opción                                  | Por defecto       | Descripción                                                   |
| --------------------------------------- | ----------------- | ------------------------------------------------------------- |
| `Config.Locale`                         | `es`              | Idioma (`es` / `en` — crea `locales/<idioma>.json`)           |
| `Config.Command`                        | `normas`          | Comando para **abrir** el guidebook                           |
| `Config.AdminCommand`                   | `normasadmin`     | Comando del **editor** (solo staff)                           |
| `Config.AdminAce`                       | `guidebook.admin` | ACE de staff (auto-otorgado a `group.admin`)                  |
| `Config.UI.title` / `subtitle` / `logo` | —                 | Branding del sidebar                                          |
| `Config.UI.accent`                      | `#346ddb`         | Color de acento (links, activo, botones)                      |
| `Config.UI.theme` / `allowThemeToggle`  | `light` / `true`  | Tema por defecto y botón claro/oscuro                         |
| `Config.Seed`                           | 3 categorías demo | **Contenido inicial** (solo la primera vez; luego vive en DB) |

#### 🌱 Config.Seed

Es un ejemplo que se copia a la base de datos la **primera vez**. Luego todo se edita desde el juego.

> \[!IMPORTANT] Pega el contenido Markdown **pegado al margen izquierdo** (sin indentación). El parser hace `dedent` automático, pero mantener el borde limpio evita sorpresas con la sintaxis GitBook (tablas, bloques de código, etc.).

Ejemplo válido:

```lua
{ title = 'Introducción', content = [[
# Título

Contenido pegado al margen izquierdo.

{% hint style="info" %}
Esto es un aviso GitBook.
{% endhint %}
]] },
```

#### 🎁 Sintaxis Markdown soportada (compatible con GitBook)

**Markdown estándar**

| Sintaxis                | Resultado            |
| ----------------------- | -------------------- |
| `# ## ### ####`         | Títulos (1-5)        |
| `**texto**`             | **Negrita**          |
| `*texto*`               | *Cursiva*            |
| `~~texto~~`             | ~~Tachado~~          |
| `` `código` ``          | `código` inline      |
| ` ```lenguaje ... ``` ` | Bloque de código     |
| `- item` / `1. item`    | Listas               |
| `- [ ]` / `- [x]`       | Tareas (checkbox)    |
| `> cita`                | Blockquote           |
| `\| col \| col \|`      | Tablas               |
| `---` / `***` / `___`   | Separador horizontal |
| `![alt](url)`           | Imagen               |
| `[texto](url)`          | Enlace               |

**Extensiones GitBook (los bloques `{% ... %}`)**

| Sintaxis                                                      | Uso                             |
| ------------------------------------------------------------- | ------------------------------- |
| `{% hint style="info" %}...{% endhint %}`                     | Aviso azul (info)               |
| `{% hint style="warning" %}...{% endhint %}`                  | Aviso amarillo (warning)        |
| `{% hint style="danger" %}...{% endhint %}`                   | Aviso rojo (danger)             |
| `{% hint style="success" %}...{% endhint %}`                  | Aviso verde (success)           |
| `> [!INFO]` `> [!WARNING]` `> [!DANGER]` `> [!SUCCESS]`       | Estilo GitHub (también válidos) |
| `> [!NOTE]` `> [!TIP]` `> [!CAUTION]` `> [!IMPORTANT]`        | Alias adicionales               |
| `{% tabs %}{% tab title="X" %}...{% endtab %}{% endtabs %}`   | Pestañas                        |
| `{% embed url="..." %}`                                       | Bloque de embed                 |
| `{% file src="..." %}`                                        | Descarga de archivo             |
| `{% content-ref url="..." %}[texto](...){% endcontent-ref %}` | Card de referencia              |

**HTML soportado (GitBook exporta muchos como HTML)**

| Tag                                                            | Uso                          |
| -------------------------------------------------------------- | ---------------------------- |
| `<strong>` / `<b>`                                             | Negrita                      |
| `<em>` / `<i>`                                                 | Cursiva                      |
| `<u>`                                                          | Subrayado                    |
| `<del>` / `<s>` / `<strike>`                                   | Tachado                      |
| `<code>`                                                       | Código inline                |
| `<kbd>F1</kbd>`                                                | Tecla                        |
| `<sub>` / `<sup>`                                              | Subíndice / superíndice      |
| `<br>`                                                         | Salto de línea               |
| `<figure><img src="..."><figcaption>...</figcaption></figure>` | Imagen con leyenda           |
| `<details><summary>...</summary>...</details>`                 | Bloque plegable              |
| `<mark style="color:X;">texto</mark>`                          | Texto **coloreado**          |
| `<mark style="background-color:X;">texto</mark>`               | Highlight con color de fondo |
| `<mark style="color:X;background-color:Y;">texto</mark>`       | **Ambos combinados**         |
| `<span style="color:X;background:Y;">texto</span>`             | Color de texto/fondo libre   |

**Anidamiento** — funcionan combinaciones profundas como:

* `<b><i><u>triple</u></i></b>` ✓
* `<mark style="color:red;"><b>bold rojo</b></mark>` ✓
* `**md-bold con <i>i html</i> mezclado**` ✓
* `Texto <mark style="color:red;">**negrita roja**</mark>` ✓

#### 📖 Panel "On this page" (TOC)

Aparece **automáticamente** a la derecha si la página tiene 2+ encabezados (`##` / `###`):

* Muestra los títulos como índice.
* **Scroll-spy**: resalta la sección visible mientras haces scroll.
* Clic en un item → scroll suave a esa sección.
* Se oculta solo en páginas cortas (un único encabezado).

#### 🌐 Idiomas

Todos los textos de la interfaz están en `locales/es.json` y `locales/en.json`:

```json
{
  "on_this_page": "En esta página",
  "search": "Buscar...",
  "add_page": "Nueva página",
  ...
}
```

Para añadir otro idioma: copia `es.json` a `fr.json`, tradúcelo, y pon `Config.Locale = 'fr'`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.privalo.dev/scripts/essentials/guidebook/config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
