Intro
CI/CD Fundamentals
.gitlab-ci.yml Basics
GitLab Runners
GitLab Executors
Specific Runners
Artifacts
Documentation Generation
Monitoring
2. Configuring MkDocs
The mkdocs.yml
file is the configuration file for your MkDocs project. This file defines the structure, theme, and other settings for your documentation site.
Practical Exercise
-
Modify the
mkdocs.yml
File:- Open the
mkdocs.yml
file in a text editor and make changes such as:- Setting the site name:
site_name: My Project Documentation
- Adding a theme, for example:
theme: name: material
- Adding pages to the documentation structure:
nav: - Home: index.md - About: about.md
- Setting the site name:
- Open the
-
Create Additional Markdown Files:
- Create a new file in the
docs/
directory namedabout.md
and add some content:# About This Project This project is aimed at demonstrating how to use MkDocs with GitLab CI/CD.
- Create a new file in the
-
Build the Documentation:
- Once you’ve modified the configuration and added new content, run the following command to build the static site:
mkdocs build
- Once you’ve modified the configuration and added new content, run the following command to build the static site: