diff --git a/.gitea/workflows/deploy-pages.yml b/.gitea/workflows/deploy-pages.yml index 154a12f..b7d7291 100644 --- a/.gitea/workflows/deploy-pages.yml +++ b/.gitea/workflows/deploy-pages.yml @@ -15,10 +15,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Build theme + - name: Install theme run: | /opt/python-env/bin/pip install mkdocs-material + - name: Install Syntax highlightning + run: | + /opt/python-env/bin/pip install pygments + - name: Build mkdocs run: | export TZ="Europe/Zurich" diff --git a/docs/guides/git.md b/docs/guides/git.md index c231125..10b37eb 100644 --- a/docs/guides/git.md +++ b/docs/guides/git.md @@ -1,4 +1,118 @@ -# GIT +# Git -### What is git -### Commands \ No newline at end of file + +--- + +## Clone a repository +Copy an existing remote repository to your local machine. + +```shell +git clone +``` +Example: +```shell +git clone https://github.com/user/repo.git +``` + +--- + +## Pull changes from remote +Fetch and merge changes from a remote repository to your local branch. + +```shell +git pull +``` +Example: +```shell +git pull origin main +``` + +--- + +## Push changes to remote +Upload local commits to a remote repository. + +```shell +git push +``` +Example: +```shell +git push origin main +``` + +--- + +## Rebase branches +Reapply commits on top of another base tip. + +```shell +git rebase +``` +Example: +```shell +git rebase main +``` + +--- + +## Initialize a new repository +Create a new Git repository in the current directory. + +```shell +git init +``` + +--- + +## Manage remotes + +- **Add a remote:** +```shell +git remote add +``` + +- **Set/Update remote URL:** +```shell +git remote set-url +``` + +- **Remove a remote (e.g., origin):** +```shell +git remote remove origin +``` + +--- + +## Commit changes with GPG signature +Sign your commit with a GPG key. + +```shell +git commit -S -m "Your commit message" +``` +- `-S` → sign commit with GPG key +- `-m` → commit message + +--- + +## Notes +- To check the configured remotes: +```shell +git remote -v +``` +- To see commit history: +```shell +# Those options only add Styling, +git log --oneline --graph --all --decorate + +# Plain Text Log, +git log + +``` + +- Stage changes before committing: +```shell +git add +git add . # stage all changes +``` + +--- \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index b4efa3a..83addfe 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,13 +7,13 @@ Welcome to Noah's project documentation control room. Here you can quickly acces ## Guides ### 1. [Git](guides/git.md) -- **Description:** All useful git commands +- **Description:** All useful git commands. - **Main files:** - [Check it out](guides/git.md) ### 2. [Markdown](guides/markdown.md) -- **Description:** Markdown Syntax +- **Description:** Markdown Syntax. - **Main files:** - [Check it out](guides/markdown.md) @@ -23,7 +23,7 @@ Welcome to Noah's project documentation control room. Here you can quickly acces ## Projects ### 1. [LernDoku Template](projects/lerndoku-template/getting-started.md) -- **Description:** Base template for learning documentation. +- **Description:** Base template for learning documentation - **Main files:** - [Getting Started](projects/lerndoku-template/getting-started.md) - [git clone](projects/lerndoku-template/docs/index.md) diff --git a/mkdocs.yml b/mkdocs.yml index 8abfd61..19f693a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,9 +4,13 @@ site_url: https://pombas_n.pages.psi.ch theme: name: material + features: + - navigation.instant + - navigation.instant.prefetch + - navigation.instant.progress palette: - # Light mode + # Light mode purple - scheme: default toggle: icon: material/brightness-7 @@ -14,6 +18,7 @@ theme: primary: purple accent: purple + # Light mode blue - scheme: default toggle: icon: material/numeric-1-box @@ -21,14 +26,15 @@ theme: primary: blue accent: blue - # Dark mode + # Dark mode purple - scheme: slate toggle: icon: material/brightness-4 - name: Switch to light mode + name: Switch to light mode purple primary: purple accent: purple + # Dark mode blue - scheme: slate toggle: icon: material/numeric-1-box @@ -37,6 +43,7 @@ theme: accent: blue + extra_css: - assets/stylesheets/extra.css @@ -56,3 +63,9 @@ plugins: - en - de +markdown_extensions: + - pymdownx.superfences + - pymdownx.highlight + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg