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

# Publish

- [Site audience](https://gitbook.com/docs/publish/site-audience.md): Control access to your published documentation.
- [Private publishing with share links](https://gitbook.com/docs/publish/site-audience/share-links.md): Add greater control over who can view your published GitBook documentation
- [Authenticated access](https://gitbook.com/docs/publish/site-audience/authenticated-access.md): Set up custom authentication for your published content
- [Enabling authenticated access](https://gitbook.com/docs/publish/site-audience/authenticated-access/enabling-authenticated-access.md)
- [Setting up Auth0](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-auth0.md): Set up an Auth0 login screen for visitors to your docs
- [Setting up Azure AD](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-azure-ad.md): Set up an Azure AD login screen for visitors to your docs
- [Setting up AWS Cognito](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-aws-cognito.md): Set up an AWS Cognito login screen for visitors to your docs
- [Setting up Okta](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-okta.md): Set up an Okta login screen for visitors to your docs
- [Setting up OIDC](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-oidc.md): Set up an OIDC login screen for visitors to your docs
- [Setting up a custom backend](https://gitbook.com/docs/publish/site-audience/authenticated-access/setting-up-a-custom-backend.md): Set up a custom login screen for visitors to your docs
- [Adaptive content](https://gitbook.com/docs/publish/adaptive-content.md): Deliver a tailored documentation experience based on who's reading
- [Enabling adaptive content](https://gitbook.com/docs/publish/adaptive-content/enabling-adaptive-content.md): Choose an authentication method to pass user data to GitBook.
- [Cookies](https://gitbook.com/docs/publish/adaptive-content/enabling-adaptive-content/cookies.md): Pass visitor data into your docs through a public or signed cookie
- [URL](https://gitbook.com/docs/publish/adaptive-content/enabling-adaptive-content/url.md): Pass visitor data into your docs through URL query parameters
- [Feature flags](https://gitbook.com/docs/publish/adaptive-content/enabling-adaptive-content/feature-flags.md): Pass visitor data into your docs through a feature flag provider
- [Authenticated access](https://gitbook.com/docs/publish/adaptive-content/enabling-adaptive-content/authenticated-access.md)
- [Adapting your content](https://gitbook.com/docs/publish/adaptive-content/adapting-your-content.md): Tailor your content for different users
- [Testing with segments](https://gitbook.com/docs/publish/adaptive-content/testing-with-segments.md): Test your conditions with mock data
- [FAQ and troubleshooting](https://gitbook.com/docs/publish/adaptive-content/faq-and-troubleshooting.md): Common questions and troubleshooting steps for adaptive content
- [Set a custom domain](https://gitbook.com/docs/publish/custom-domain.md): Set a custom domain for your docs sites
- [Setting a custom subdirectory](https://gitbook.com/docs/publish/custom-domain/setting-a-custom-subdirectory.md): Set a custom subdirectory for your docs sites
- [Configuring a subdirectory with Cloudflare](https://gitbook.com/docs/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-cloudflare.md): Host your documentation with a /docs subdirectory using Cloudflare
- [Configuring a subdirectory with Vercel](https://gitbook.com/docs/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-vercel.md): Host your documentation with a /docs subdirectory using Vercel
- [Configuring a subdirectory with AWS using CloudFront and Route 53](https://gitbook.com/docs/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-aws.md): Host your documentation with a /docs subdirectory using AWS CloudFront and Route 53.
- [Site redirects](https://gitbook.com/docs/publish/site-redirects.md): Set up site redirects to route traffic to content anywhere on your site
- [SEO](https://gitbook.com/docs/publish/seo.md): GitBook handles most SEO automatically. Published sites are responsive, pre-rendered, and served via a global CDN, with little configuration needed from you.
- [PDF export](https://gitbook.com/docs/publish/pdf-export.md): Export a PDF copy of your GitBook content
- [Embed in your product](https://gitbook.com/docs/publish/embedding.md): Embed your documentation in your product or website using the Docs Embed.
- [Implementation](https://gitbook.com/docs/publish/embedding/implementation.md)
- [Script tag](https://gitbook.com/docs/publish/embedding/implementation/script.md): Learn how to add the Docs Embed widget to any website or web app using a single script tag
- [Node.js/NPM](https://gitbook.com/docs/publish/embedding/implementation/nodejs.md): Integrate Docs Embed using the NPM package for full application-level control
- [React](https://gitbook.com/docs/publish/embedding/implementation/react.md): Use prebuilt React components to add the Docs Embed to your React application
- [Authentication](https://gitbook.com/docs/publish/embedding/using-with-authenticated-docs.md): Use the Docs Embed with sites that require authentication by passing visitor tokens or using authenticated access
- [Configuration](https://gitbook.com/docs/publish/embedding/configuration.md)
- [Customizing the Embed](https://gitbook.com/docs/publish/embedding/configuration/customizing-docs-embed.md): Customize the experience when embedding Docs Embed into your product or app by setting welcome messages, actions, and more
- [Connect to custom tools](https://gitbook.com/docs/publish/embedding/configuration/creating-custom-tools.md): Connect GitBook Assistant to any tool you can call from your app — especially support workflows
- [API Reference](https://gitbook.com/docs/publish/embedding/configuration/reference.md): Learn more about the methods available to use when working with Docs Embed programmatically
- [Publish a docs site](https://gitbook.com/docs/publish/publish-a-docs-site.md): Publish your documentation to the internet as a docs site
- [Public publishing](https://gitbook.com/docs/publish/publish-a-docs-site/public-publishing.md): Publish your docs publicly to the web so that everyone can access them
- [Guides](https://gitbook.com/docs/publish/guides.md): Explore guides for publishing and managing your GitBook docs site


---

# 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://gitbook.com/docs/publish.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.
