mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
dap (#25941)
<!--Delete sections as needed --> ## Description <!-- Tell us what you did and why --> ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
13 files changed
+482
-4
No files matched your search
@@ -139,4 +139,3 @@ subscription management.
|
||||
Targeted at IT administrators with help on deploying Docker Desktop at scale with configuration guidance on security related features.
|
||||
|
||||
{{< grid items=enterprise >}}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
title: Docker Agentic Platform
|
||||
description: Run agents and tools in isolated, hosted sandboxes with Docker Agentic Platform.
|
||||
keywords: docker agentic platform, agents, sandboxes, mcp, secrets, network policies
|
||||
weight: 5
|
||||
sitemap: false
|
||||
params:
|
||||
sidebar:
|
||||
group: AI and agents
|
||||
badge:
|
||||
color: violet
|
||||
text: Experimental
|
||||
grid:
|
||||
- title: Get started
|
||||
description: Choose an agent environment and start a sandbox.
|
||||
icon: rocket-launch
|
||||
link: /agentic-platform/get-started/
|
||||
- title: Sandboxes
|
||||
description: Work with hosted agent environments.
|
||||
icon: command-line
|
||||
link: /agentic-platform/sandboxes/
|
||||
- title: MCP
|
||||
description: Connect predefined or custom MCP servers.
|
||||
icon: cpu-chip
|
||||
link: /agentic-platform/mcp/
|
||||
- title: Secrets
|
||||
description: Manage model provider and service credentials.
|
||||
icon: key
|
||||
link: /agentic-platform/secrets/
|
||||
- title: Policies
|
||||
description: Control outbound network access from sandboxes.
|
||||
icon: shield-check
|
||||
link: /agentic-platform/policies/
|
||||
- title: FAQ
|
||||
description: Review launch scope and product boundaries.
|
||||
icon: question-mark-circle
|
||||
link: /agentic-platform/faq/
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
> Docker Agentic Platform is experimental. Features and behavior may change.
|
||||
|
||||
Docker Agentic Platform runs agents and agent-powered tools in isolated
|
||||
sandboxes on Docker-managed cloud infrastructure. An active workload is not
|
||||
tied to your computer remaining awake or connected. You can leave the Console
|
||||
and return to the sandbox while the agent continues working.
|
||||
|
||||
For sandboxes that run on your development machine through the `sbx` CLI, see
|
||||
[Docker Sandboxes](/manuals/ai/sandboxes/_index.md).
|
||||
|
||||
From the web Console, choose the type of sandbox to run and configure its model
|
||||
credential, network access, tools, and compute. Docker creates the sandbox and
|
||||
opens a live terminal for interacting with the agent. The **Sandboxes** page
|
||||
provides one place to return to and manage your running and paused workloads.
|
||||
|
||||
Account-level configuration can be reused across sandboxes:
|
||||
|
||||
- [MCP](/manuals/agentic-platform/mcp.md) connects external tools.
|
||||
- [Secrets](/manuals/agentic-platform/secrets.md) provide credentials
|
||||
without placing their values inside a sandbox.
|
||||
- [Network policies](/manuals/agentic-platform/policies.md) control
|
||||
outbound destinations.
|
||||
|
||||
To begin, open [Docker Agentic Platform](https://agentic-platform.docker.com/)
|
||||
and sign in with your Docker account. Docker meters sandbox compute per second.
|
||||
For account and payment information, see [Docker Billing](/billing/).
|
||||
|
||||
{{< grid >}}
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: Docker Agentic Platform FAQ
|
||||
linkTitle: FAQ
|
||||
description: Find answers about Docker Agentic Platform sandboxes, access, credentials, billing, and data retention.
|
||||
keywords: docker agentic platform, faq, sandboxes, agents, docker sandboxes, usage, billing, inference, logs, telemetry, snapshots, data retention
|
||||
weight: 80
|
||||
aliases:
|
||||
- /agentic-platform/concepts/local-cloud/
|
||||
---
|
||||
|
||||
## What can I run in Docker Agentic Platform?
|
||||
|
||||
Docker Agentic Platform provides predefined sandbox types for Claude Code,
|
||||
Codex, OpenCode, Copilot, and Gemini CLI. Each runs in an isolated, Docker-hosted
|
||||
sandbox with a live terminal.
|
||||
|
||||
## How does Docker Agentic Platform differ from Docker Sandboxes?
|
||||
|
||||
Docker Agentic Platform runs sandboxes on Docker-managed cloud infrastructure
|
||||
through a web Console. Docker Sandboxes runs sandboxes on your development
|
||||
machine through the `sbx` command. Docker Agentic Platform manages the compute,
|
||||
MCP connections, secrets, and network policies used by its hosted sandboxes.
|
||||
|
||||
## Can I move a sandbox between my machine and Docker Agentic Platform?
|
||||
|
||||
No. Local and hosted sandboxes are separate in the initial release. You cannot
|
||||
move a running sandbox or its local bind mounts into Docker Agentic Platform.
|
||||
|
||||
## Can I share sandboxes and configuration with a team?
|
||||
|
||||
The initial self-service experience is single-user. You manage your own
|
||||
sandboxes, MCP connections, secrets, and network policies. Shared workspaces
|
||||
and collaborative ownership are not part of the initial release.
|
||||
|
||||
## How does a sandbox access external services?
|
||||
|
||||
Network policies control the destinations a sandbox can reach. The sandbox
|
||||
type's read-only kit policy applies automatically, and you can select zero or
|
||||
more user policies when you create the sandbox. If you select no user policies,
|
||||
only the kit policy applies and destinations that it does not allow are blocked.
|
||||
A deny rule takes precedence over an allow rule. Docker stores configured
|
||||
secret values outside the sandbox and applies them to matching requests through
|
||||
the sandbox proxy.
|
||||
|
||||
## How are sandbox usage and model inference billed?
|
||||
|
||||
Docker bills sandbox compute per second while the sandbox runs. The Console
|
||||
also shows the equivalent hourly rate.
|
||||
|
||||
Model inference is billed separately. The sandbox uses your credential for an
|
||||
external model provider, which meters and bills inference under that provider
|
||||
account. See [Docker Billing](/billing/) for account, usage, and payment
|
||||
information.
|
||||
|
||||
## How long are logs, telemetry, and snapshots retained?
|
||||
|
||||
Docker retains Docker Agentic Platform service logs for 31 days and raw
|
||||
telemetry for 12 months.
|
||||
|
||||
All snapshots, including the most recent snapshot created when you pause a
|
||||
sandbox, are automatically deleted after seven days of non-use.
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Get started with Docker Agentic Platform
|
||||
linkTitle: Get started
|
||||
description: Choose an agent environment and start a Docker Agentic Platform sandbox.
|
||||
keywords: docker agentic platform, get started, agents, sandbox, live terminal
|
||||
weight: 10
|
||||
aliases:
|
||||
- /agentic-platform/concepts/platform-model/
|
||||
- /agentic-platform/concepts/kits/
|
||||
- /agentic-platform/guides/manage-kits/
|
||||
---
|
||||
|
||||
The Docker Agentic Platform launcher collects the configuration needed to start
|
||||
an agent in an isolated sandbox.
|
||||
|
||||
## Before you begin
|
||||
|
||||
You need a Docker account, access to Docker Agentic Platform, and an API key for
|
||||
the model provider you want to use. You can add the key under **Secrets** before
|
||||
creating the sandbox or provide it in the launcher when prompted.
|
||||
|
||||
The available sandbox types are Claude Code, Codex, OpenCode, Copilot, and
|
||||
Gemini CLI. The supported model provider credentials are Anthropic, OpenAI,
|
||||
GitHub Copilot, and Google.
|
||||
|
||||
## Start a sandbox
|
||||
|
||||
1. Open [Docker Agentic Platform](https://agentic-platform.docker.com/) and
|
||||
select **New**.
|
||||
2. Choose a sandbox type and select or add its required model credential.
|
||||
Copilot uses `GITHUB_TOKEN`; add the same GitHub secret to any other sandbox
|
||||
type that needs private repository access.
|
||||
3. Configure the sandbox. The initial settings are **open access**, **no tools
|
||||
added**, and **medium compute**.
|
||||
4. Choose whether Docker stops or deletes the sandbox when its timer expires,
|
||||
and set the timer from 1 to 24 hours.
|
||||
5. Review the configuration and select **Run**.
|
||||
|
||||
You cannot change the sandbox's authentication, tools, access policy, or compute
|
||||
size after it starts. Docker creates the sandbox, marks it as running, and opens
|
||||
its terminal.
|
||||
|
||||
Use the terminal to interact with the selected agent or tool.
|
||||
|
||||
Return to **Sandboxes** to find the running sandbox and reopen its terminal.
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Manage sandboxes](/manuals/agentic-platform/sandboxes.md)
|
||||
- [Connect MCP servers](/manuals/agentic-platform/mcp.md)
|
||||
- [Manage secrets](/manuals/agentic-platform/secrets.md)
|
||||
- [Manage network policies](/manuals/agentic-platform/policies.md)
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: MCP
|
||||
description: Connect predefined and custom MCP servers for Docker Agentic Platform sandboxes.
|
||||
keywords: docker agentic platform, mcp servers, mcp tools, authorization, remote url
|
||||
weight: 30
|
||||
aliases:
|
||||
- /agentic-platform/concepts/mcp-tools/
|
||||
- /agentic-platform/guides/configure-mcp-tools/
|
||||
---
|
||||
|
||||
Model Context Protocol (MCP) servers connect agents to external services and
|
||||
expose operations from those services as tools. From the **MCP** page, connect a
|
||||
predefined server or add a custom server by URL. Complete authorization when a
|
||||
server requires it.
|
||||
|
||||
MCP configuration grants agents tools they can invoke. It does not restrict or
|
||||
inspect ordinary network access from a sandbox. Use
|
||||
[network policies](/manuals/agentic-platform/policies.md) to control outbound
|
||||
destinations. MCP-specific policies are not part of the initial release.
|
||||
|
||||
## Connect a predefined server
|
||||
|
||||
1. Open **MCP** and choose a predefined server.
|
||||
2. Connect the server.
|
||||
3. Complete authorization if prompted.
|
||||
|
||||
## Add a server by URL
|
||||
|
||||
To connect a server that is not predefined:
|
||||
|
||||
1. Open **MCP**.
|
||||
2. Choose the option to add a server and enter its URL.
|
||||
3. Connect the server and complete authorization if prompted.
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
title: Network policies
|
||||
linkTitle: Policies
|
||||
description: Control outbound network access from Docker Agentic Platform sandboxes.
|
||||
keywords: docker agentic platform, network policies, network access, allow rules, deny rules
|
||||
weight: 50
|
||||
aliases:
|
||||
- /agentic-platform/concepts/policies/
|
||||
- /agentic-platform/guides/create-and-apply-policies/
|
||||
---
|
||||
|
||||
Network policies control the external destinations that sandboxes can reach.
|
||||
They are separate from MCP server connections and secret bindings.
|
||||
|
||||
Docker Agentic Platform uses two types of network policy:
|
||||
|
||||
- Kit policies are read-only policies for each sandbox type. The corresponding
|
||||
kit policy is applied automatically when you create a sandbox. These rules
|
||||
are the sandbox type's kit defaults. Review them under **Kit policies** on the
|
||||
**Policies** page.
|
||||
- User policies are policies that you can select when you create a sandbox.
|
||||
Docker provides the read-only **Open** and **Balanced** presets, and you can
|
||||
create custom policies. **Open** allows all outbound destinations.
|
||||
**Balanced** allows a curated set of destinations.
|
||||
|
||||
You can select no user policies, one policy, or multiple policies. The selected
|
||||
user policies are combined with the sandbox type's kit policy. Docker evaluates
|
||||
all applicable rules, and a deny rule takes precedence over an allow rule.
|
||||
|
||||
If you select no user policies, only the kit policy applies. Network access is
|
||||
default-deny, so the sandbox can reach only destinations that the kit policy
|
||||
explicitly allows. If its kit policy has no network rules, all outbound
|
||||
destinations are blocked.
|
||||
|
||||
## Policy rules
|
||||
|
||||
Policy rules allow or deny network destinations. Use the following hostname
|
||||
patterns:
|
||||
|
||||
| Pattern | Example | Matches |
|
||||
| --------------------- | ----------------- | -------------------------------------------------- |
|
||||
| Exact hostname | `example.com` | `example.com` only, not subdomains |
|
||||
| Single-level wildcard | `*.example.com` | One subdomain level, such as `api.example.com` |
|
||||
| Multi-level wildcard | `**.example.com` | Any depth: `api.example.com`, `v2.api.example.com` |
|
||||
| Hostname with port | `example.com:443` | `example.com` on port 443 only |
|
||||
|
||||
`example.com` does not match subdomains, and `*.example.com` does not match the
|
||||
root domain. Add each pattern required by your destinations.
|
||||
|
||||
You can also match IPv4 and IPv6 CIDR ranges, such as `10.0.0.0/8`,
|
||||
`192.168.1.0/24`, and `2001:db8::/32`.
|
||||
|
||||
When defining access, include every service the sandbox needs during startup
|
||||
and operation. Depending on the workload, these services can include source
|
||||
control hosts, package registries, and model providers.
|
||||
|
||||
## Create a policy
|
||||
|
||||
1. Open **Policies** and select **New policy**.
|
||||
2. Enter a name that identifies the intended workload or access level.
|
||||
3. Add allow and deny rules for the required destinations.
|
||||
4. Review the rules and save the policy.
|
||||
|
||||
To apply the policy, select it under **Egress policy for this sandbox** when you
|
||||
create a sandbox.
|
||||
|
||||
You can edit, copy, or delete a custom policy. Docker-managed policies cannot
|
||||
be edited or deleted.
|
||||
|
||||
## Understand blocked access
|
||||
|
||||
An agent might report an HTTP 403 response, a connection failure, or another
|
||||
service error when a required destination is not allowed. The error output from
|
||||
the agent or tool is the primary source for identifying the destination.
|
||||
|
||||
For a sandbox that uses limited access, account for every host and port the
|
||||
workload needs, including source control, package registries, model providers,
|
||||
and supporting APIs. Add the narrowest allow rule that covers the required
|
||||
destination. Use **Open** when broad outbound access is appropriate for the
|
||||
workload.
|
||||
|
||||
Network policy controls outbound destinations. It does not grant MCP tools or
|
||||
supply credentials. Configure those separately under **MCP** and **Secrets**.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Docker Agentic Platform release notes
|
||||
linkTitle: Release notes
|
||||
description: Review feature updates, behavior changes, and fixes in Docker Agentic Platform.
|
||||
keywords: docker agentic platform, release notes, updates, fixes
|
||||
weight: 90
|
||||
---
|
||||
|
||||
## August 26, 2026
|
||||
|
||||
Docker Agentic Platform is available for running agent and tool workloads in
|
||||
sandboxes hosted on Docker-managed cloud infrastructure.
|
||||
|
||||
The initial release includes:
|
||||
|
||||
- Predefined sandbox types for Claude Code, Codex, OpenCode, Copilot, and
|
||||
Gemini CLI
|
||||
- A live terminal for interacting with the workload running in a sandbox
|
||||
- Pause, resume, and delete controls for sandboxes
|
||||
- Automatic sandbox stop or deletion after a timer from 1 to 24 hours
|
||||
- Predefined MCP servers and custom servers added by URL, with connection and
|
||||
authorization flows
|
||||
- Provider and service credential management under **Secrets**, with values
|
||||
kept outside sandboxes
|
||||
- Read-only kit policies that apply automatically, Docker-managed Open and
|
||||
Balanced user policies, selectable custom policies, and deny-over-allow
|
||||
precedence
|
||||
- Metered sandbox compute with selectable instance sizes
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Sandboxes
|
||||
description: Create and manage hosted agent environments in Docker Agentic Platform.
|
||||
keywords: docker agentic platform, sandboxes, agents, cloud runtime, terminal, compute
|
||||
weight: 20
|
||||
aliases:
|
||||
- /agentic-platform/concepts/sandboxes/
|
||||
- /agentic-platform/guides/manage-sandboxes/
|
||||
---
|
||||
|
||||
A sandbox is an isolated runtime for an agent or tool. Docker hosts and meters
|
||||
the sandbox on managed cloud infrastructure and provides a live terminal for
|
||||
interacting with it.
|
||||
|
||||
Docker Agentic Platform provides predefined sandbox types for Claude Code,
|
||||
Codex, OpenCode, Copilot, and Gemini CLI. Each sandbox has its own compute,
|
||||
filesystem, network access, and terminal. A sandbox continues running
|
||||
independently of your connection to the Console until it is paused, stopped by
|
||||
its lifecycle timer, or deleted.
|
||||
|
||||
## Source code and files
|
||||
|
||||
A sandbox starts with a fresh filesystem. Docker Agentic Platform does not
|
||||
mount a repository, local directory, or workspace from your computer into the
|
||||
sandbox by default.
|
||||
|
||||
A sandbox does not synchronize its filesystem with your computer or a remote
|
||||
repository. Work remains only in the sandbox unless you commit and push it to a
|
||||
remote repository. Push work that you want to keep before deleting the
|
||||
sandbox; files that exist only in a deleted sandbox are not available from a
|
||||
later sandbox.
|
||||
|
||||
Docker Agentic Platform supports GitHub repositories for bringing source into
|
||||
a sandbox and preserving changes. Configure `GITHUB_TOKEN` under **Secrets** or
|
||||
from the sandbox launcher to clone a private repository or perform write
|
||||
operations such as pushing a branch or opening a pull request. The token must
|
||||
have the required repository permissions. Public repositories can be cloned
|
||||
without a GitHub credential, but writing to them still requires authentication.
|
||||
|
||||
## Open a sandbox
|
||||
|
||||
After you select **Run**, Docker creates the sandbox and opens its detail page.
|
||||
Use the terminal to interact with the selected agent or tool.
|
||||
|
||||
Open **Sandboxes** to review each sandbox's name, type, status, hourly rate,
|
||||
expiration, and age. Select a sandbox to reopen its detail page and terminal.
|
||||
|
||||
## Manage the lifecycle
|
||||
|
||||
A sandbox can be running or paused:
|
||||
|
||||
- Pause a running sandbox to stop its compute without deleting it.
|
||||
- Resume a paused sandbox to continue working with it.
|
||||
- Delete a sandbox when you no longer need it.
|
||||
|
||||
When you create a sandbox, set a lifecycle timer from 1 to 24 hours and choose
|
||||
what happens when it expires. **Stop** stops the sandbox, while **Delete**
|
||||
deletes the sandbox and its files.
|
||||
|
||||
The sandbox's authentication, tools, access policy, and compute size are fixed
|
||||
when the sandbox is created and cannot be changed while it runs.
|
||||
|
||||
Docker bills sandbox compute per second while the sandbox runs. Model inference
|
||||
uses your external provider credential and is metered by that provider. For
|
||||
account, usage, and payment information, see [Docker Billing](/billing/).
|
||||
|
||||
## Check sandbox configuration
|
||||
|
||||
If the agent cannot reach a service or use a tool, check the configuration that
|
||||
applies to the request:
|
||||
|
||||
- Confirm that the network policies permit the destination.
|
||||
- If the agent needs an MCP tool, confirm that its server is connected and
|
||||
authorized.
|
||||
- If the destination requires authentication, confirm that the required
|
||||
service credential is configured under **Secrets**.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Secrets
|
||||
description: Manage model provider and service credentials for Docker Agentic Platform sandboxes.
|
||||
keywords: docker agentic platform, secrets, api keys, service credentials, proxy
|
||||
weight: 40
|
||||
aliases:
|
||||
- /agentic-platform/concepts/secrets/
|
||||
- /agentic-platform/guides/manage-secrets/
|
||||
---
|
||||
|
||||
Secrets provide credentials to agents without placing their values in a
|
||||
sandbox. Docker Agentic Platform stores each value outside sandboxes and uses
|
||||
the sandbox proxy to apply it to matching requests.
|
||||
|
||||
Docker Agentic Platform supports the following credentials:
|
||||
|
||||
| Service | Secret ID | Used by |
|
||||
| ------------- | ------------------- | ------------------------------------------------- |
|
||||
| Anthropic | `ANTHROPIC_API_KEY` | Claude Code and OpenCode with Anthropic models |
|
||||
| OpenAI | `OPENAI_API_KEY` | Codex and OpenCode with OpenAI models |
|
||||
| Google Gemini | `GEMINI_API_KEY` | Gemini CLI and OpenCode with Google models |
|
||||
| GitHub | `GITHUB_TOKEN` | Copilot and any sandbox type that accesses GitHub |
|
||||
|
||||
Provider-specific credentials are applied only to matching requests from
|
||||
compatible sandbox types. For example, an Anthropic credential is not applied
|
||||
to requests from a Codex sandbox. OpenCode can use any configured provider that
|
||||
it supports.
|
||||
|
||||
## GitHub credential
|
||||
|
||||
`GITHUB_TOKEN` authenticates both Copilot and GitHub repository operations.
|
||||
Entering it in the launcher stores it as the same GitHub secret shown under
|
||||
**Secrets**. Any sandbox type can use it for matching GitHub requests, such as
|
||||
cloning a private repository or pushing changes.
|
||||
|
||||
## Configure a secret
|
||||
|
||||
To configure a credential before launching a sandbox:
|
||||
|
||||
1. Open **Secrets** and find the service.
|
||||
2. Select the edit icon for that service.
|
||||
3. Enter its API key or token and save the value.
|
||||
|
||||
You can also provide a required credential from **New** when you launch a
|
||||
sandbox.
|
||||
|
||||
## Manage secrets
|
||||
|
||||
The **Secrets** page shows each secret ID and the sandboxes that use it. Select
|
||||
the copy icon to copy the secret ID, or select the edit icon to change the
|
||||
stored value.
|
||||
|
||||
Agents see the secret ID, not the stored value. When an outbound request matches
|
||||
the secret's service binding, the sandbox proxy applies the value to the
|
||||
request. A secret for one service does not become a general-purpose credential
|
||||
inside the sandbox.
|
||||
|
||||
Do not put API keys or tokens in prompts or files inside the sandbox. Rotate or
|
||||
revoke a credential at its provider when it is no longer needed.
|
||||
@@ -28,7 +28,7 @@ manually. This documentation is for users who want to understand how the Gateway
|
||||
> [!TIP]
|
||||
> E2B sandboxes now include direct access to the Docker MCP Catalog, giving developers
|
||||
> access to over 200 tools and services to seamlessly build and run AI agents. For
|
||||
> more information, see [E2B Sandboxes](sandboxes.md).
|
||||
> more information, see [E2B Sandboxes](e2b-sandboxes.md).
|
||||
|
||||
## How it works
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
- /learn
|
||||
"/security/access-tokens/":
|
||||
- /go/access-tokens/
|
||||
"/agentic-platform/":
|
||||
- /go/dap/
|
||||
"/reference/api/engine/#deprecated-api-versions":
|
||||
- /engine/api/v1.18/
|
||||
- /engine/api/v1.19/
|
||||
|
||||
@@ -10,6 +10,16 @@ ignoreLogs:
|
||||
|
||||
taxonomies: {}
|
||||
|
||||
security:
|
||||
exec:
|
||||
allow:
|
||||
- ^(dart-)?sass$
|
||||
- ^go$
|
||||
- ^git$
|
||||
- ^node$
|
||||
- ^postcss$
|
||||
- ^tailwindcss$
|
||||
|
||||
# Cascade layout and type settings to content subtrees.
|
||||
# See https://gohugo.io/configuration/cascade/#target
|
||||
cascade:
|
||||
|
||||
@@ -15,9 +15,16 @@
|
||||
</nav>
|
||||
|
||||
{{ define "renderChildren" }}
|
||||
{{- $pages := where .Pages "Params.sitemap" "ne" "false" }}
|
||||
{{- $sourcePages := .Pages }}
|
||||
{{- if .Params.sidebar.reverse }}
|
||||
{{ $pages = .Pages.Reverse }}
|
||||
{{ $sourcePages = $sourcePages.Reverse }}
|
||||
{{- end }}
|
||||
{{- $pages := slice }}
|
||||
{{- range $sourcePages }}
|
||||
{{- $isActive := or (eq page .) (page.IsDescendant .) }}
|
||||
{{- if or (ne .Params.sitemap false) $isActive }}
|
||||
{{- $pages = $pages | append . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $ungrouped := where $pages "Params.sidebar.group" "==" nil }}
|
||||
{{- range $ungrouped }}
|
||||
|
||||
Reference in new issue
Block a user