Skip to content

GitLab Pages

Projects can automatically publish a documentation site powered by Material for MkDocs and GitLab Pages.

  • Get started by creating mkdocs.yml and docs/index.md files.
  • GitLab Pages has a tutorial on how to write these files.
  • With those in place, a site gets re-published every time the default branch changes. We only auto-publish the default branch for now.
  • Material for MkDocs has a great docs site and offers lots of plugins that should work on our GitLab pages. You may need to install their prerequisites in a before_script step in the pages job.

If the project has a logo image file logo.png this should be saved in the project's top-level directory, in accordance with the Drupal standard practice. However, the logo to be displayed in the MkDocs documentation site is taken from the /docs folder. This allows for an alternative logo on the documentation site. If there is no logo stored in the /docs folder then the file from the top-level folder will be used. You do not need to keep a duplicate file in both places.