diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 331ac3a..a7adb0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,4 @@ +--- name: mkdocs build on: push: @@ -10,7 +11,7 @@ jobs: image: docker.io/rockylinux:9 steps: - name: Install deps - run: dnf -y install git python3 python3-pip + run: dnf -y upgrade && dnf -y install git python3 python3-pip cairo-devel - name: setup ssh env: @@ -29,9 +30,9 @@ jobs: - name: Install python requirements run: python3 -m pip install -r requirements.txt - + - name: Deploy - env: + env: GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" GIT_AUTHOR_NAME: "Rocky Bot" GIT_AUTHOR_EMAIL: "auto@rockylinux.org" diff --git a/.gitignore b/.gitignore index 45ddf0a..1f592aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ site/ +.cache diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..2c37103 --- /dev/null +++ b/Containerfile @@ -0,0 +1,8 @@ +FROM quay.io/rockylinux/rockylinux:9 + +RUN dnf -y upgrade +RUN dnf install -y git python3 python3-pip cairo-devel + +COPY . /wiki +WORKDIR /wiki +RUN pip install -r requirements.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2071b23 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index cc39059..82be8ff 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,32 @@ This is the wiki repository for SIG/Core. https://sig-core.rocky.page -## Building +## Continuous Integration / Continuous Deployment -To test the appearance of this wiki, give it a try: +Actions Runner executes workflow to publish to https://REPLACEME.rocky.page on push to main. + +## Building Locally + +In order to build this wiki locally, a docker-compose configuration and container file are supplied which when invoked, will launch mkdocs' development server in a container bound to port 8000 and will live-reload when changes are made to the wiki files. + +To run the containers on your system, invoke podman or docker compose like so: ``` +podman-compose -f docker-compose.yml up -d +``` + +The container will build and then launch itself. Afterwards, you should be able to view the wiki content at http://localhost:8000. + +The compose file accepts a build argument if you need to run it on a different port. For example, to bind to port 8080 on your local machine: ``` +podman-compose -f docker-compose --build-arg PORT=8080 up -d +``` + +## Project layout + + mkdocs.yml # The configuration file. + README.md # This file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4578c22 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +--- +version: '3' + +services: + wiki: + build: + context: . + dockerfile: Containerfile + command: ["mkdocs", "serve", "-w", "/wiki", "--dev-addr", "0.0.0.0:${PORT:-8000}"] + volumes: + - .:/wiki:z,rw + ports: + - "${PORT:-8000}:8000" diff --git a/docs/assets/extra.css b/docs/assets/extra.css new file mode 100644 index 0000000..63bd68d --- /dev/null +++ b/docs/assets/extra.css @@ -0,0 +1,31 @@ +:root { + .md-nav__title[for="__drawer"] { + background: linear-gradient(135deg, #10b981 0%, #1055b9 100%); + } +} + +[data-md-color-scheme="resf"] { + --md-accent-fg-color: #0e7391; + --md-primary-fg-color--dark: #107fa1; + --md-primary-fg-color--light: #FFFFFF; + --md-primary-fg-color: #107fa1; + --md-typeset-a-color: #107fa1; +} +[data-md-color-scheme="resf-dark"] { + color-scheme: dark; + --md-default-fg-color: #FFFFFF; + --md-default-bg-color: rgb(30, 33, 41); + + --md-primary-fg-color: #107fa1; + --md-primary-bg-color: #FFFFFF; + --md-primary-fg-color--dark: #107fa1; + + --md-accent-fg-color: #0e7391; + + --md-default-fg-color--light: rgba(226, 228, 233, 0.56); + + --md-typeset-table-color: rgba(240, 241, 244, 0.12); + + --md-typeset-color: rgba(226, 228, 233, 0.82); + --md-typeset-a-color: #107fa1; +} diff --git a/docs/assets/resf-icon-w-bg.png b/docs/assets/resf-icon-w-bg.png new file mode 100644 index 0000000..6fd6b7c Binary files /dev/null and b/docs/assets/resf-icon-w-bg.png differ diff --git a/docs/assets/resf-icon.png b/docs/assets/resf-icon.png new file mode 100644 index 0000000..f15f2d9 Binary files /dev/null and b/docs/assets/resf-icon.png differ diff --git a/docs/assets/resf-white.svg b/docs/assets/resf-white.svg new file mode 100644 index 0000000..5aef3af --- /dev/null +++ b/docs/assets/resf-white.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + diff --git a/mkdocs.yml b/mkdocs.yml index 5dc2a87..0e0b23e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -10,37 +10,57 @@ repo_url: https://git.resf.org/sig_core/wiki repo_name: sig_core/wiki edit_uri: edit/main/docs/ +copyright: Copyright © 2022-2024 Rocky Enterprise Software Foundation + +extra_css: + - assets/extra.css + +# Configuration theme: name: material + logo: assets/resf-white.svg palette: - media: "(prefers-color-scheme: light)" - scheme: default - primary: teal - accent: teal + scheme: resf toggle: icon: material/weather-night name: Switch to dark mode - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: teal - accent: teal + scheme: resf-dark toggle: - icon: material/weather-night - name: Switch to dark mode - logo: assets/icon-white.svg + icon: material/weather-sunny + name: Switch to light mode highlightjs: true hljs_languages: - bash + - perl - python - yaml - - perl features: + - navigation.expand + - navigation.indexes + - navigation.instant + - navigation.sections + - navigation.top + - navigation.tracking + - navigation.path - search.highlight - search.suggest - toc.integrate - #- navigation.tabs - #- navigation.tabs.sticky - #- navigation.top + - content.action.edit + +# Plugins +plugins: + - autolinks + - social + - awesome-pages + - git-revision-date-localized: + type: date + - search + - macros: + include_dir: docs/include + +# Extensions markdown_extensions: - abbr - admonition @@ -48,22 +68,12 @@ markdown_extensions: - def_list - footnotes - meta - - pymdownx.details # collapsable attributions + - pymdownx.details # this allows collapsible attributions - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg - pymdownx.superfences - pymdownx.tabbed: alternate_style: true - toc: permalink: true - -plugins: - - autolinks - - awesome-pages - - git-revision-date - - search - - macros: - include_dir: docs/include -copyright: Copyright © 2023 Rocky Enterprise Software Foundation -... diff --git a/requirements.txt b/requirements.txt index 0ff9854..20a64dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,8 @@ mkdocs mkdocs-cinder mkdocs-autolinks-plugin mkdocs-awesome-pages-plugin -mkdocs-git-revision-date-plugin +mkdocs-git-revision-date-localized-plugin mkdocs-macros-plugin mkdocs-material mkdocs-windmill +mkdocs-material[imaging]