diff --git a/.editorconfig b/.editorconfig index b3230cc..bb9afe1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ end_of_line = lf [*.py] max_line_length = 88 -[*.{sh,yml,yaml,json}] +[*.{sh,yml,yaml,json,md}] indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..4a9a0d9 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,31 @@ +name: Deploy Documentation +on: + workflow_dispatch: + push: + branches: + - docs +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- + - name: Install dependencies + run: pip install -r requirements.txt + - name: Build and deploy documentation + run: mkdocs gh-deploy --force diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9e998a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM squidfunk/mkdocs-material:latest + +# Install additional plugins required by our mkdocs configuration +RUN pip install \ + mkdocs-git-revision-date-localized-plugin \ + mkdocstrings[python] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..de98507 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + mkdocs: + build: . + ports: + - "8000:8000" + volumes: + - ./:/docs + command: serve --dev-addr=0.0.0.0:8000 diff --git a/kiauh/components/__init__.py b/docs/assets/configuration.md similarity index 100% rename from kiauh/components/__init__.py rename to docs/assets/configuration.md diff --git a/docs/assets/logo-large.png b/docs/assets/logo-large.png new file mode 100644 index 0000000..0135a87 Binary files /dev/null and b/docs/assets/logo-large.png differ diff --git a/resources/screenshots/kiauh.png b/docs/assets/logo.png similarity index 100% rename from resources/screenshots/kiauh.png rename to docs/assets/logo.png diff --git a/docs/changelog.md b/docs/development/changelog.md similarity index 99% rename from docs/changelog.md rename to docs/development/changelog.md index 0699150..b6b2976 100644 --- a/docs/changelog.md +++ b/docs/development/changelog.md @@ -276,7 +276,7 @@ Each service gets its corresponding instance added to the service filename. * The user can now choose to install Klipper as a systemd service. -* The Shell Command extension and `shell_command.py` got renamed to G-Code Shell Command extension and `gcode_shell_command.py`. In case the [pending PR](https://github.com/KevinOConnor/klipper/pull/2173) will be merged in the future, this was an early attempt to dodge possible incompatibilities. The [G-Code Shell Command docs](gcode_shell_command.md) has been updated accordingly. +* The Shell Command extension and `shell_command.py` got renamed to G-Code Shell Command extension and `gcode_shell_command.py`. In case the [pending PR](https://github.com/KevinOConnor/klipper/pull/2173) will be merged in the future, this was an early attempt to dodge possible incompatibilities. The [G-Code Shell Command docs](extensions/gcode-shell-command) has been updated accordingly. * The way how KIAUH interacts and writes to the users printer.cfg got changed. Usually KIAUH wrote everything directly into the printer.cfg. The way it will work from now on is, that a new file called `kiauh.cfg` will be created if there is something that needs to be written to the printer.cfg and everything gets written to `kiauh.cfg` instead. The only thing which then gets written to the users printer.cfg is `[include kiauh.cfg]`. This line will be located at the very top of the existing printer.cfg with a little comment as a note. The user can then decide to either keep the `kiauh.cfg` or take its content, places it into the printer.cfg directly and remove the `[include kiauh.cfg]`. diff --git a/kiauh/components/klipper/menus/__init__.py b/docs/development/contributing.md similarity index 100% rename from kiauh/components/klipper/menus/__init__.py rename to docs/development/contributing.md diff --git a/docs/gcode_shell_command.md b/docs/extensions/gcode-shell-command.md similarity index 100% rename from docs/gcode_shell_command.md rename to docs/extensions/gcode-shell-command.md diff --git a/kiauh/components/klipper/services/__init__.py b/docs/extensions/index.md similarity index 100% rename from kiauh/components/klipper/services/__init__.py rename to docs/extensions/index.md diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..94e7824 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,20 @@ +

+ KIAUH - Klipper Installation And Update Helper +

+ +

+ KIAUH logo +

+

+ A handy installation script that makes installing Klipper (and more) a breeze! +

+ + +## Features + +- Easy installation of Klipper and related components +- Support for multiple instances +- Extension system for additional functionality +- Configuration management +- And more! + diff --git a/kiauh/components/moonraker/menus/__init__.py b/docs/installation.md similarity index 100% rename from kiauh/components/moonraker/menus/__init__.py rename to docs/installation.md diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..347b552 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,82 @@ +site_name: KIAUH Documentation +site_description: Documentation for the Klipper Installation And Update Helper +repo_url: https://github.com/dw-0/kiauh +repo_name: dw-0/kiauh +edit_uri: edit/master/docs + +copyright: Copyright © 2025 Dominik Willner + +theme: + name: material + logo: assets/logo.png + favicon: assets/logo.png + icon: + repo: fontawesome/brands/github + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: blue-grey + accent: cyan + toggle: + icon: material/weather-night + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue-grey + accent: cyan + toggle: + icon: material/weather-sunny + name: Switch to light mode + features: + - navigation.instant + - navigation.tracking + - navigation.sections + - navigation.expand + - navigation.indexes + - navigation.top + - toc.follow + - content.code.copy + +plugins: + - search + - git-revision-date-localized: + enable_creation_date: true + - mkdocstrings: + handlers: + python: + paths: [.] + options: + docstring_style: google + +markdown_extensions: + - admonition + - pymdownx.details + - pymdownx.superfences + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + - tables + - attr_list + - md_in_html + +nav: + - Home: index.md + - Installation: installation.md + - Configuration: configuration.md + - Extensions: + - extensions/index.md + - extensions/gcode-shell-command.md + - Development: + - development/contributing.md + - development/changelog.md + +extra: + social: + - icon: simple/github + link: https://github.com/dw-0 + - icon: simple/kofi + link: https://ko-fi.com/dw__0 + - icon: simple/paypal + link: https://www.paypal.com/paypalme/dwillner0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d7b7fdf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +mkdocs-material +mkdocs +mkdocstrings[python] +mkdocs-git-revision-date-localized-plugin \ No newline at end of file