This commit is contained in:
2025-02-05 09:27:28 +01:00
parent b06f99b9b9
commit a88ea26a3e
7 changed files with 41 additions and 30 deletions

View File

@@ -4,7 +4,7 @@
Mkdocs generates HTML from Markdown making an easy documentation page. So you don't have to struggle with html and css so you can focus on things more important.
## How to set it up
For this project im going to use Gitlab CI pipelines. CI stands for continuous intergration. That means that with every push you can make something do. For example clean up code or generate a documentation page based on what you've written in markdown.
For this project im going to use Gitlab CI pipelines. CI stands for continuous integration. That means that with every push you can make something do. For example clean up code or generate a documentation page based on what you've written in markdown.
### Step 1 choosing a theme
In [this](https://github.com/mkdocs/catalog) github repo there is a catalog of themes that you can choose. I went with the Ivory theme. (note this changed to material theme but the steps are still the same. [link](../week_1_fabacademy/customising_mkdocs.md))
@@ -32,7 +32,7 @@ This is my requirements file
mkdocs>=1.5.3
mkdocs-ivory>=0.4.6
```
To find the version number of the theme you want you need to open the package website and there you can find what the latest version it's on. You don't have to add the version numbers but I do it because if the package mainter sends out a broken update the package still works.
To find the version number of the theme you want you need to open the package website and there you can find what the latest version it's on. You don't have to add the version numbers but I do it because if the package maintainer sends out a broken update the package still works.
#### gitlab-ci.yml
gitlab-ci.yml tells gitlab what to do when a commit is send out. For example this yml file builds a page and publishes it.
@@ -67,9 +67,9 @@ What does everything do?
| stage | Defines what stage the build process is in. This can be used to run jobs in parallel. for example: all early stage jobs at the same time and all main stage jobs at the same time. |
| artifacts | Jobs can leave files. This tells them to save them |
| path | This tells which files or folders to store as the artifacts |
| rules | This tells when to run the pipline |
| if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | If the branch commited to is set to the default branch in gitlab. Then run the pipline |
| changes | tell the pipline to only update when certain files or folders are changed |
| rules | This tells when to run the pipeline |
| if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | If the branch committed to is set to the default branch in gitlab. Then run the pipeline |
| changes | tell the pipeline to only update when certain files or folders are changed |
## Sources
* https://gitlab.com/pages/mkdocs