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
Create and fill in a
robots.txtfile.Add the file to the server in the same folder as the Gramax
docker-compose.yaml.In
docker-compose.yaml, add the file path under thevolumes:field:- ./robots.txt:/app/public/robots.txtRestart
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 lineSitemap: https://docs.example.com/sitemap.xmland theAllow: /directive.
Disable indexing
Build without the --base-url parameter. In this case, robots.txt and sitemap.xml are not generated.
Partial indexing
Create and fill in a
robots.txtfile.Add the file to the server in the same folder as the site.