Search Engine Indexing

By default, the documentation portal is automatically indexed — after each publication, the sitemap.xml and robots.txt files are updated. You can change this behavior — for example, hide the portal from search engine indexing.

For a Docker portal

Index

By default, the documentation portal is indexed automatically.

Disable indexing

When deploying the documentation portal, set the environment variable DISABLE_SEO: True.

If DISABLE_SEO is set to true but a robots.txt file is present on the server, the file takes precedence.

Partial indexing

  1. Create and fill in a robots.txt file.

  2. Add the file to the server in the same folder as the Gramax docker-compose.yaml.

  3. In docker-compose.yaml, add the file path under the volumes: field:

    - ./robots.txt:/app/public/robots.txt
  4. Restart docker-compose.yaml.

For a static site

Index

When building the documentation portal via CLI, pass the --base-url parameter — a full URL with protocol (https://) — to generate robots.txt and sitemap.xml.

gramax-cli build --base-url https://docs.example.com

This produces the following files in the build artifact root:

  • sitemap.xml — with all public portal pages and absolute links based on --base-url.

  • robots.txt — with the line Sitemap: https://docs.example.com/sitemap.xml and the Allow: / directive.

Disable indexing

Build without the --base-url parameter. In this case, robots.txt and sitemap.xml are not generated.

Partial indexing

  1. Create and fill in a robots.txt file.

  2. Add the file to the server in the same folder as the site.