From 76a28abdc8c20f10adede3371ab0f2e9a72a1723 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Mon, 27 Jan 2025 16:19:43 +0100 Subject: [PATCH] customsation mkdocs docs --- docs/bootcamp/git-setup.md | 4 ++ docs/week1_fabacademy/customising-mkdocs.md | 44 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 docs/week1_fabacademy/customising-mkdocs.md diff --git a/docs/bootcamp/git-setup.md b/docs/bootcamp/git-setup.md index 803437b..53aec55 100644 --- a/docs/bootcamp/git-setup.md +++ b/docs/bootcamp/git-setup.md @@ -23,3 +23,7 @@ Once you run that it outputs a key. That key is your public ssh key. You can sha Now you can register the key that got output in the console on the gitlab server. First click your profile picture in gitlab and then go to edit profile. Now you have a menu bar on the left, there you can click the SSH Keys tab and register your ssh key. After you have done that you can push and pull from your gitlab repository. +## Cloning the repository +To clone a git repository you need a link to the repository. How + +TODO: finish this \ No newline at end of file diff --git a/docs/week1_fabacademy/customising-mkdocs.md b/docs/week1_fabacademy/customising-mkdocs.md new file mode 100644 index 0000000..9fd2e71 --- /dev/null +++ b/docs/week1_fabacademy/customising-mkdocs.md @@ -0,0 +1,44 @@ +# Customising mkdocs + +I wanna customise my mkdocs theme. So I can have a dark mode. Because it currently looks like this. + +![alt text](image.png) + + +## Issues + +### Attempt 1 +I tried changing it by referencing extra css but when it builded i looked through the job artifacts and I saw that it didnt pick up on the file + +```yml +site_name: Fab Academy docs page - Sam +site_url: https://pages.gitlab.io/mkdocs +site_dir: public +theme: + name: ivory +extra_css: [extra.css] +``` +```css +.footer-note { + color:rgb(47, 44, 44) !important +} + +.home .version { + color:rgb(47, 44, 44) !important + } +``` +### Attempt 2 +After I read the documentation thoroughly i found out that the css file needs to be relative to the `docs` folder and not the `mkdocs.yml`. After that it showed the css and I could finaly customise the theme. + +![alt text](image-1.png) + +## Customising Material theme +I decided to switch to material theme because its easier to configure and you can add all sorts of modules onto it making it super customisable. + + + + + +### Links +* https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#table-of-contents +* https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#table-of-contents