From b1c303c2984b0a14c60df9a8bc5b31a4671a5106 Mon Sep 17 00:00:00 2001 From: grimsi <9295182+grimsi@users.noreply.github.com> Date: Fri, 30 May 2025 22:04:20 +0200 Subject: [PATCH] Add MkDocs --- .github/workflows/docs.yml | 30 ++++++++++++++++++++++++++ docs/assets/logo.svg | 1 + docs/index.md | 17 +++++++++++++++ mkdocs.yml | 44 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/assets/logo.svg create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..9d6c57f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,30 @@ +name: publish docs +on: + push: + branches: + - master + - main + - v2 +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 0000000..1fa5052 --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1 @@ +Element 12 \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..000ea34 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,17 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..0da9d5a --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,44 @@ +site_name: Gameyfin Docs (beta) +site_url: https://gameyfin.github.io +theme: + name: material + logo: assets/logo.svg + favicon: assets/logo.svg + palette: + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: white + accent: purple + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + accent: blue + toggle: + icon: material/brightness-4 + name: Switch to system preference + font: + code: JetBrains Mono + +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - pymdownx.tabbed: + alternate_style: true + - admonition + - pymdownx.details \ No newline at end of file