Internal vs. Merchant Content Guide
This guide defines which content is internal-only and must be hidden in the Merchant build (DOCS_AUDIENCE=merchant).
How the Merchant Build Works
The Merchant build is triggered by setting the environment variable:
DOCS_AUDIENCE=merchant yarn build
Content is excluded from the Merchant build in two ways:
| Mechanism | What It Excludes |
|---|---|
exclude in docusaurus.config.js | Entire folders/files — never built at all |
<Audience include="internal"> component | Inline sections within a page — stripped at build time |
Excluded Folders (Entire sections not built for Merchant)
The following top-level folders are excluded entirely from the Merchant build:
| Folder | Reason |
|---|---|
docs/05-engineering-guide/ | Internal engineering standards, runbooks, handbook |
docs/contributing-guide/ | Authoring and documentation guidelines |
docs/06-high-level-designs/ | Architecture diagrams and internal design docs |
docs/03-developers/5-convenient-checkout-api/5-customers/ | Internal wallet management operations |
docs/03-developers/5-convenient-checkout-api/8-third-party-integrations/ | 3rd Party Integration like EIMP events |
These are configured in the
excludearray insidedocusaurus.config.jsunderpresets → classic → docs.
Inline Internal Sections (<Audience include="internal">)
Use the <Audience> component to hide specific sections within a page that merchants should not see. The section is stripped from the Merchant build but remains visible in the internal build.
Syntax
<Audience include="internal">
This content is only visible in the internal docs build.
</Audience>
What to Wrap as Internal
The following types of content must be wrapped in <Audience include="internal">:
| Content Type | Examples |
|---|---|
| Infrastructure / architecture details | AKS cluster config, multi-cloud gateway topology, Splunk setup |
| Internal processing flows | Sequence diagrams, wallet merge logic, enterprise settings logic |
| Internal API endpoints or admin APIs | 13--Admin.md, internal-only routes |
| Sensitive error root causes | DB errors, upstream dependencies, internal retry logic |
| Staff-facing notes | Implementation notes, known issues not yet customer-visible |
| Webhook internal mapping | Internal event → external event translation tables |
| HCP-internal URLs | HCP API catalog internal links, internal JIRA/Confluence references |
What Does NOT Need to Be Wrapped
Merchant-facing content should not be wrapped — leave it visible in both builds:
- API request/response schemas
- Integration guides and code examples
- Error codes and resolutions visible to merchants
- Supported payment methods and capabilities
- Customization and theming docs
- Sandbox/staging credentials guidance
AI Assistant
The AI Assistant (ChatBot + SearchBox) is automatically hidden in the Merchant build. No manual wrapping is needed. This includes:
- The floating ChatBot sidebar (
<ChatBot />inRoot.js) - The AI-powered SearchBox in the Navbar
- The "AI Assistant is available!" announcement bar
Checklist Before Publishing a New Page
When adding a new doc that will appear in both builds, run through this checklist:
- Does the page contain infrastructure or architecture internals? → Wrap in
<Audience include="internal"> - Does it have internal-only processing flows or sequence diagrams? → Wrap in
<Audience include="internal"> - Is it an entire internal-only section? → Add the folder to the
excludelist indocusaurus.config.js - Is the page permission metadata set correctly? (
permission: [merchant, internal, business]) - Run
yarn build:merchantlocally to verify the content is stripped correctly