diff --git a/.ci/mkdocs/mkdocs.yaml b/.ci/mkdocs/mkdocs.yaml deleted file mode 100644 index 3ace6f2f..00000000 --- a/.ci/mkdocs/mkdocs.yaml +++ /dev/null @@ -1,86 +0,0 @@ ---- - -# Project information -site_name: bjw-s | Helm charts | Docs -site_description: Docs for the bjw-s Helm charts repository -site_author: bjw-s -site_url: https://bjw-s.github.io/helm-charts/docs - -# Repository -repo_name: bjw-s/helm-charts -repo_url: https://github.com/bjw-s/helm-charts -edit_uri: "" - -# Configuration -theme: - name: material - icon: - repo: fontawesome/brands/github-alt - language: en - features: - - navigation.sections - - navigation.tabs - - navigation.tracking - # - navigation.indexes - - search.highlight - - search.share - - search.suggest - palette: - - scheme: default - primary: blue - accent: indigo - toggle: - icon: material/toggle-switch-off-outline - name: Switch to dark mode - - scheme: slate - primary: blue - accent: indigo - toggle: - icon: material/toggle-switch - name: Switch to light mode - font: - text: Roboto - code: Roboto Mono - -docs_dir: ../../docs -site_dir: ../../_site - -# Plugins -plugins: - - search - - minify: - minify_html: true - -# Customization -extra: - social: - - icon: fontawesome/brands/github - link: https://github.com/bjw-s - - icon: fontawesome/brands/discord - link: https://discord.gg/sTMX7Vh - -# Extensions -markdown_extensions: - - admonition - - abbr - - attr_list - - def_list - - footnotes - - meta - - md_in_html - - pymdownx.highlight - - pymdownx.snippets: - check_paths: true - - pymdownx.superfences - - toc: - permalink: true - -# Page tree -nav: - - Home: index.md - - Common Library: - - Introduction: common-library/introduction.md - - Common Storage: common-library/common-library-storage.md - - Common Add-ons: common-library/common-library-add-ons.md - - App Template: - - Introduction: app-template/introduction.md diff --git a/.ci/mkdocs/requirements.txt b/.ci/mkdocs/requirements.txt deleted file mode 100644 index 1b4ca1fd..00000000 --- a/.ci/mkdocs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -mkdocs==1.4.2 -mkdocs-macros-plugin ==0.7.0 -mkdocs-material ==9.0.3 -mkdocs-minify-plugin==0.6.2 -mkdocs-redirects==1.2.0 diff --git a/.github/workflows/docs-release.yaml b/.github/workflows/docs-release.yaml index 6e9044cb..4e91d580 100644 --- a/.github/workflows/docs-release.yaml +++ b/.github/workflows/docs-release.yaml @@ -6,14 +6,15 @@ on: branches: - main paths: - - '.ci/mkdocs/mkdocs.yaml' - - '.github/workflows/docs-release.yaml' + - ".github/workflows/docs-release.yaml" - "docs/**" jobs: release-docs: name: Release documentation runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} steps: - name: Get GitHub API token id: get-app-token @@ -22,7 +23,7 @@ jobs: app_id: ${{ secrets.BJWS_APP_ID }} private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} - - name: Checkout charts branch + - name: Checkout main branch uses: actions/checkout@v3 with: token: ${{ steps.get-app-token.outputs.token }} @@ -37,22 +38,50 @@ jobs: ref: "gh-pages" fetch-depth: 0 - - name: Install Python - uses: actions/setup-python@v4 + - name: Create binaries folder + run: | + mkdir -p "$GITHUB_WORKSPACE/bin" + echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1.2.0 + + - name: Download mdbook-admonish + uses: robinraju/release-downloader@v1.7 with: - python-version: "3.10" + repository: tommilligan/mdbook-admonish + fileName: "*-unknown-linux-gnu.tar.gz" + latest: true - - name: Install mkdocs - shell: bash + - name: Download mdbook-open-on-gh + uses: robinraju/release-downloader@v1.7 + with: + repository: badboy/mdbook-open-on-gh + fileName: "*-unknown-linux-gnu.tar.gz" + latest: true + + - name: Extract plug-ins + run: | + for f in *.tar.gz; do tar xvf "$GITHUB_WORKSPACE/$f" -C bin/; done + + - name: Download mdbook-linkcheck + run: | + cd /tmp + curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip + unzip "$_" + chmod +x mdbook-linkcheck + mv mdbook-linkcheck "$GITHUB_WORKSPACE/bin/" + + - name: Build docs working-directory: src run: | - pip install -r ./.ci/mkdocs/requirements.txt + mdbook build "docs" - - name: Build documentation - shell: bash + - name: Move docs to destination working-directory: src run: | - mkdocs build --config-file ./.ci/mkdocs/mkdocs.yaml -d "$PWD/../dest/docs" + rm -rf "$PWD/../dest/docs" + mv docs/book/html "$PWD/../dest/docs" - name: Commit changes shell: bash diff --git a/.taskfiles/docs.yaml b/.taskfiles/docs.yaml deleted file mode 100644 index 9b28eb5a..00000000 --- a/.taskfiles/docs.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -version: "3" - -vars: - MKDOCS_CONFIG_FILE: .ci/mkdocs/mkdocs.yaml - -tasks: - build: - desc: > - Build documentation using mkdocs - cmds: - - mkdocs build --config-file ./.ci/mkdocs/mkdocs.yaml - silent: true - - serve: - desc: > - Start development server on http://localhost:{{ .PORT }} using mkdocs - vars: - PORT: 8000 - cmds: - - mkdocs serve --config-file ./.ci/mkdocs/mkdocs.yaml --dev-addr localhost:{{ .PORT }} --livereload - silent: true diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..7585238e --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/docs/assets/css/mdbook-admonish.css b/docs/assets/css/mdbook-admonish.css new file mode 100644 index 00000000..5e360387 --- /dev/null +++ b/docs/assets/css/mdbook-admonish.css @@ -0,0 +1,352 @@ +@charset "UTF-8"; +:root { + --md-admonition-icon--note: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--abstract: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--info: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--tip: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--success: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--question: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--warning: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--failure: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--danger: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--bug: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--example: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--quote: + url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: + url("data:image/svg+xml;charset=utf-8,"); +} + +:is(.admonition) { + display: flow-root; + margin: 1.5625em 0; + padding: 0 1.2rem; + color: var(--fg); + page-break-inside: avoid; + background-color: var(--bg); + border: 0 solid black; + border-inline-start-width: 0.4rem; + border-radius: 0.2rem; + box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.05), 0 0 0.1rem rgba(0, 0, 0, 0.1); +} +@media print { + :is(.admonition) { + box-shadow: none; + } +} +:is(.admonition) > * { + box-sizing: border-box; +} +:is(.admonition) :is(.admonition) { + margin-top: 1em; + margin-bottom: 1em; +} +:is(.admonition) > .tabbed-set:only-child { + margin-top: 0; +} +html :is(.admonition) > :last-child { + margin-bottom: 1.2rem; +} + +a.admonition-anchor-link { + display: none; + position: absolute; + left: -1.2rem; + padding-right: 1rem; +} +a.admonition-anchor-link:link, a.admonition-anchor-link:visited { + color: var(--fg); +} +a.admonition-anchor-link:link:hover, a.admonition-anchor-link:visited:hover { + text-decoration: none; +} +a.admonition-anchor-link::before { + content: "§"; +} + +:is(.admonition-title, summary) { + position: relative; + margin-block: 0; + margin-inline: -1.6rem -1.2rem; + padding-block: 0.8rem; + padding-inline: 4.4rem 1.2rem; + font-weight: 700; + background-color: rgba(68, 138, 255, 0.1); + display: flex; +} +:is(.admonition-title, summary) p { + margin: 0; +} +html :is(.admonition-title, summary):last-child { + margin-bottom: 0; +} +:is(.admonition-title, summary)::before { + position: absolute; + top: 0.625em; + inset-inline-start: 1.6rem; + width: 2rem; + height: 2rem; + background-color: #448aff; + mask-image: url('data:image/svg+xml;charset=utf-8,'); + -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,'); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-size: contain; + content: ""; +} +:is(.admonition-title, summary):hover a.admonition-anchor-link { + display: initial; +} + +details.admonition > summary.admonition-title::after { + position: absolute; + top: 0.625em; + inset-inline-end: 1.6rem; + height: 2rem; + width: 2rem; + background-color: currentcolor; + mask-image: var(--md-details-icon); + -webkit-mask-image: var(--md-details-icon); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-size: contain; + content: ""; + transform: rotate(0deg); + transition: transform 0.25s; +} +details[open].admonition > summary.admonition-title::after { + transform: rotate(90deg); +} + +:is(.admonition):is(.note) { + border-color: #448aff; +} + +:is(.note) > :is(.admonition-title, summary) { + background-color: rgba(68, 138, 255, 0.1); +} +:is(.note) > :is(.admonition-title, summary)::before { + background-color: #448aff; + mask-image: var(--md-admonition-icon--note); + -webkit-mask-image: var(--md-admonition-icon--note); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.abstract, .summary, .tldr) { + border-color: #00b0ff; +} + +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { + background-color: rgba(0, 176, 255, 0.1); +} +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { + background-color: #00b0ff; + mask-image: var(--md-admonition-icon--abstract); + -webkit-mask-image: var(--md-admonition-icon--abstract); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.info, .todo) { + border-color: #00b8d4; +} + +:is(.info, .todo) > :is(.admonition-title, summary) { + background-color: rgba(0, 184, 212, 0.1); +} +:is(.info, .todo) > :is(.admonition-title, summary)::before { + background-color: #00b8d4; + mask-image: var(--md-admonition-icon--info); + -webkit-mask-image: var(--md-admonition-icon--info); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.tip, .hint, .important) { + border-color: #00bfa5; +} + +:is(.tip, .hint, .important) > :is(.admonition-title, summary) { + background-color: rgba(0, 191, 165, 0.1); +} +:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { + background-color: #00bfa5; + mask-image: var(--md-admonition-icon--tip); + -webkit-mask-image: var(--md-admonition-icon--tip); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.success, .check, .done) { + border-color: #00c853; +} + +:is(.success, .check, .done) > :is(.admonition-title, summary) { + background-color: rgba(0, 200, 83, 0.1); +} +:is(.success, .check, .done) > :is(.admonition-title, summary)::before { + background-color: #00c853; + mask-image: var(--md-admonition-icon--success); + -webkit-mask-image: var(--md-admonition-icon--success); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.question, .help, .faq) { + border-color: #64dd17; +} + +:is(.question, .help, .faq) > :is(.admonition-title, summary) { + background-color: rgba(100, 221, 23, 0.1); +} +:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { + background-color: #64dd17; + mask-image: var(--md-admonition-icon--question); + -webkit-mask-image: var(--md-admonition-icon--question); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.warning, .caution, .attention) { + border-color: #ff9100; +} + +:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { + background-color: rgba(255, 145, 0, 0.1); +} +:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { + background-color: #ff9100; + mask-image: var(--md-admonition-icon--warning); + -webkit-mask-image: var(--md-admonition-icon--warning); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.failure, .fail, .missing) { + border-color: #ff5252; +} + +:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { + background-color: rgba(255, 82, 82, 0.1); +} +:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { + background-color: #ff5252; + mask-image: var(--md-admonition-icon--failure); + -webkit-mask-image: var(--md-admonition-icon--failure); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.danger, .error) { + border-color: #ff1744; +} + +:is(.danger, .error) > :is(.admonition-title, summary) { + background-color: rgba(255, 23, 68, 0.1); +} +:is(.danger, .error) > :is(.admonition-title, summary)::before { + background-color: #ff1744; + mask-image: var(--md-admonition-icon--danger); + -webkit-mask-image: var(--md-admonition-icon--danger); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.bug) { + border-color: #f50057; +} + +:is(.bug) > :is(.admonition-title, summary) { + background-color: rgba(245, 0, 87, 0.1); +} +:is(.bug) > :is(.admonition-title, summary)::before { + background-color: #f50057; + mask-image: var(--md-admonition-icon--bug); + -webkit-mask-image: var(--md-admonition-icon--bug); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.example) { + border-color: #7c4dff; +} + +:is(.example) > :is(.admonition-title, summary) { + background-color: rgba(124, 77, 255, 0.1); +} +:is(.example) > :is(.admonition-title, summary)::before { + background-color: #7c4dff; + mask-image: var(--md-admonition-icon--example); + -webkit-mask-image: var(--md-admonition-icon--example); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +:is(.admonition):is(.quote, .cite) { + border-color: #9e9e9e; +} + +:is(.quote, .cite) > :is(.admonition-title, summary) { + background-color: rgba(158, 158, 158, 0.1); +} +:is(.quote, .cite) > :is(.admonition-title, summary)::before { + background-color: #9e9e9e; + mask-image: var(--md-admonition-icon--quote); + -webkit-mask-image: var(--md-admonition-icon--quote); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-size: contain; + -webkit-mask-repeat: no-repeat; +} + +.navy :is(.admonition) { + background-color: var(--sidebar-bg); +} + +.ayu :is(.admonition), .coal :is(.admonition) { + background-color: var(--theme-hover); +} + +.rust :is(.admonition) { + background-color: var(--sidebar-bg); + color: var(--sidebar-fg); +} +.rust .admonition-anchor-link:link, .rust .admonition-anchor-link:visited { + color: var(--sidebar-fg); +} diff --git a/docs/book.toml b/docs/book.toml new file mode 100644 index 00000000..c6b5f3fa --- /dev/null +++ b/docs/book.toml @@ -0,0 +1,41 @@ +[book] +authors = ["Bernd Schorgers"] +language = "en" +multilingual = false +src = "src" +title = "Helm Charts" + +[build] +create-missing = false + +[output.html] +default-theme = "latte" +preferred-dark-theme = "macchiato" +git-repository-url = "https://github.com/bjw-s/helm-charts" +git-repository-icon = "fa-github" +no-section-label = true +additional-css = ["././assets/css/mdbook-admonish.css", "./theme/catppuccin.css", "./theme/catppuccin-highlight.css"] +git-branch = "main" +open-on-text = "[Edit this page on GitHub]" + +[output.html.fold] +enable = true +level = 1 + +[output.html.playground] +copyable = false + +[output.html.search] +limit-results = 15 + +[output.linkcheck] + +[preprocessor] + +[preprocessor.admonish] +command = "mdbook-admonish" +assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install` + +[preprocessor.open-on-gh] +command = "mdbook-open-on-gh" +renderer = ["html"] diff --git a/docs/common-library/common-library-storage.md b/docs/common-library/common-library-storage.md deleted file mode 100644 index 09161a47..00000000 --- a/docs/common-library/common-library-storage.md +++ /dev/null @@ -1,283 +0,0 @@ -# Common library Storage - -This page describes the different ways you can attach storage to charts -using the common library. - -## Types - -These are the types of storage that are supported in the common library. -Of course, other types are possible with the `custom` type. - -### Persistent Volume Claim - -This is probably the most common storage type, therefore it is also the -default when no `type` is specified. - -It can be attached in two ways. - -#### Dynamically provisioned - -Charts can be configured to create the required persistentVolumeClaim -manifests on the fly. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `accessMode` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| `size` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#resources) | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | -| `storageClass` | No | Storage class to use for this volume. | -| `retain` | No | Set to true to retain the PVC upon `helm uninstall`. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: pvc - accessMode: ReadWriteOnce - size: 1Gi -``` - -This will create a 1Gi RWO PVC named `RELEASE-NAME-config` with the default -storageClass, which will mount to `/config`. - -#### Existing claim - -Charts can be configured to attach to a pre-existing persistentVolumeClaim. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `existingClaim` | Yes | Name of the existing PVC | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `subPath` | No | Specifies a sub-path inside the referenced volume instead of its root. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: pvc - existingClaim: myAppData -``` - -This will mount an existing PVC named `myAppData` to `/config`. - -### Empty Dir - -Sometimes you need to share some data between containers, or need some -scratch space. That is where an emptyDir can come in. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ---------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `medium` | No | Set this to `Memory` to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node. | -| `sizeLimit` | No | If the `SizeMemoryBackedVolumes` feature gate is enabled, you can specify a size for memory backed volumes. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: emptyDir -``` - -This will create an ephemeral emptyDir volume and mount it to `/config`. - -### Host path - -In order to mount a path from the node where the Pod is running you can use a -`hostPath` type persistence item. - -This can also be used to mount an attached USB device to a Pod. Note that -this will most likely also require setting an elevated `securityContext`. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `hostPath` | Yes | Which path on the host should be mounted. | -| `hostPathType` | No | Specifying a hostPathType adds a check before trying to mount the path. See Kubernetes documentation for options. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: hostPath - hostPath: /dev -``` - -This will mount the `/dev` folder from the underlying host to `/dev` in the container. - -### configMap - -In order to mount a configMap to a mount point within the Pod you can use the -`configMap` type persistence item. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `name` | Yes | Which configMap should be mounted. Supports Helm templating. | -| `defaultMode` | No | The default file access permission bit. | -| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the configMap will be read-only. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: configMap - name: mySettings -``` - -This will mount the contents of the pre-existing `mySettings` configMap to `/config`. - -### Secret - -In order to mount a Secret to a mount point within the Pod you can use the -`secret` type persistence item. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | -| `enabled` | Yes | | -| `type` | Yes | | -| `name` | Yes | Which Secret should be mounted. Supports Helm templating. | -| `defaultMode` | No | The default file access permission bit. | -| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: secret - name: mySecret -``` - -This will mount the contents of the pre-existing `mySecret` Secret to `/config`. - -### NFS Volume - -To mount an NFS share to your Pod you can either pre-create a persistentVolumeClaim -referring to it, or you can specify an inline NFS volume: - -!!! note - Mounting an NFS share this way does not allow for specifying mount options. - If you require these, you must create a PVC to mount the share. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | -| `enabled` | Yes | | -| `type` | Yes | | -| `server` | Yes | Host name or IP address of the NFS server. | -| `path` | Yes | The path on the server to mount. | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | - -Minimal config: - -```yaml -persistence: - config: - enabled: true - type: nfs - server: 10.10.0.8 - path: /tank/nas/library -``` - -This will mount the NFS share `/tank/nas/library` on server `10.10.0.8` to `/config`. - -### Custom - -When you wish to specify a custom volume, you can use the `custom` type. -This can be used for example to mount configMap or Secret objects. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `volumeSpec` | Yes | Define the raw Volume spec here. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -## Permissions - -Charts do not modify file or folder permissions on volumes out of the box. - -This means that you will have to make sure that your storage can be written to -by the application. - -## Multiple subPaths for 1 volume - -It is possible to mount multiple subPaths from the same volume to the main -container. This can be achieved by specifying `subPath` with a list -instead of a string. - -!!! note - It is not possible to define `mountPath` at the top level when using this - feature - -Examples: - -```yaml -persistence: - config: - enabled: true - type: custom - volumeSpec: - configMap: - name: myData - subPath: - - path: myFirstScript.sh - mountPath: /data/myFirstScript.sh - - path: myCertificate.pem - mountPath: /certs/myCertificate.pem - readOnly: true -``` - -```yaml -persistence: - config: - enabled: true - type: pvc - existingClaim: myAppData - subPath: - - path: . - mountPath: /my_media - - path: Series - mountPath: /series - - path: Downloads - mountPath: /downloads -``` diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md new file mode 100644 index 00000000..1387ad53 --- /dev/null +++ b/docs/src/SUMMARY.md @@ -0,0 +1,26 @@ +# Summary + +[Introduction](introduction.md) + +--- + +# Helm Charts + +- [Common Library](common-library/introduction.md) + - [Add-ons](common-library/add-ons/index.md) + - [code-server](common-library/add-ons/code-server/index.md) + - [Storage](common-library/storage/index.md) + - [Permissions](common-library/storage/permissions.md) + - [Storage types](common-library/storage/types.md) + - [PersistentVolumeClaim](common-library/storage/types/pvc.md) + - [EmptyDir](common-library/storage/types/emptydir.md) + - [HostPath](common-library/storage/types/hostpath.md) + - [ConfigMap](common-library/storage/types/configmap.md) + - [Secret](common-library/storage/types/secret.md) + - [NFS share](common-library/storage/types/nfs-share.md) + - [Custom](common-library/storage/types/custom.md) + - [How to...](common-library/howto/index.md) + - [Multiple subPaths for 1 volume](common-library/howto/multiple-subpath.md) + - [Helm templates](common-library/howto/helm-templates.md) + +- [App Template](app-template/introduction.md) diff --git a/docs/app-template/introduction.md b/docs/src/app-template/introduction.md similarity index 83% rename from docs/app-template/introduction.md rename to docs/src/app-template/introduction.md index f43a7bd0..55f0e682 100644 --- a/docs/app-template/introduction.md +++ b/docs/src/app-template/introduction.md @@ -3,14 +3,14 @@ ## Background Since Helm [library charts](https://helm.sh/docs/topics/library_charts/) cannot be -installed directly I have created a companion chart for the [common library](../../common-library/introduction). +installed directly I have created a companion chart for the [common library](../common-library/introduction.md). ## Usage In order to use this template chart, you would deploy it as you would any other Helm chart. By setting the desired values, the common library chart will render the desired resources. -Be sure to check out the [common library docs](../../common-library/introduction) +Be sure to check out the [common library docs](../common-library/introduction.md) and its [`values.yaml`](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) for more information about the available configuration options. @@ -20,8 +20,8 @@ This is an example `values.yaml` file that would deploy the [vaultwarden](https: application. For more deployment examples, check out the [`examples` folder](https://github.com/bjw-s/helm-charts/tree/main/examples/). -``` yaml title="values.yaml" ---8<-- "./examples/helm/values.yaml" +```yaml +{{ #include ../../../examples/helm/values.yaml }} ``` ## Source code diff --git a/docs/common-library/common-library-add-ons.md b/docs/src/common-library/add-ons/code-server/index.md similarity index 74% rename from docs/common-library/common-library-add-ons.md rename to docs/src/common-library/add-ons/code-server/index.md index 8fc67984..109423e4 100644 --- a/docs/common-library/common-library-add-ons.md +++ b/docs/src/common-library/add-ons/code-server/index.md @@ -1,23 +1,18 @@ -# Common library add-ons - -The common library chart supplies a few add-ons which are meant to simplify some features -you might be looking for. These are sidecars that run in the same pod as your -application you configured it with. - -## Code Server +# Code Server The [code-server](https://github.com/cdr/code-server) add-on can be used to access and modify persistent volume data in your application. This can be useful when you need to edit the persistent volume data, for example with Home Assistant. -### Example values +## Example values Below is a snippet from a `values.yaml` using the add-on. More configuration options can be found in our common chart documentation. -!!! note - This example will mount `/config` into the code-server sidecar. +```admonish note +This example will mount `/config` into the code-server sidecar. +``` ```yaml addons: diff --git a/docs/src/common-library/add-ons/index.md b/docs/src/common-library/add-ons/index.md new file mode 100644 index 00000000..92f8dae0 --- /dev/null +++ b/docs/src/common-library/add-ons/index.md @@ -0,0 +1,5 @@ +# Common library add-ons + +The common library chart supplies a few add-ons which are meant to simplify some features +you might be looking for. These are sidecars that run in the same pod as your +application you configured it with. diff --git a/docs/src/common-library/howto/helm-templates.md b/docs/src/common-library/howto/helm-templates.md new file mode 100644 index 00000000..bba13fc8 --- /dev/null +++ b/docs/src/common-library/howto/helm-templates.md @@ -0,0 +1,45 @@ +# Helm templates + +Some fields in the common library `values.yaml` allow the use of Helm templates for their values. +This is often indicated by a remark similar to `Helm template enabled` in the field description. + +This feature allows you to have the value of that key set to the output of the given Helm template. + +## Example: + +Given the following `values.yaml` + +```yaml +image: + repository: k8s.gcr.io/git-sync/git-sync + tag: v3.6.2 + +additionalContainers: + subcleaner: + name: subcleaner + image: |- + {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }} + args: + - --repo=https://github.com/KBlixt/subcleaner.git + - --branch=master + - --depth=1 + - --root=/add-ons/subcleaner +``` + +This would render as follows: + +```yaml +image: + repository: k8s.gcr.io/git-sync/git-sync + tag: v3.6.2 + +additionalContainers: + subcleaner: + name: subcleaner + image: k8s.gcr.io/git-sync/git-sync:v3.6.2 + args: + - --repo=https://github.com/KBlixt/subcleaner.git + - --branch=master + - --depth=1 + - --root=/add-ons/subcleaner +``` diff --git a/docs/src/common-library/howto/index.md b/docs/src/common-library/howto/index.md new file mode 100644 index 00000000..82f77372 --- /dev/null +++ b/docs/src/common-library/howto/index.md @@ -0,0 +1,3 @@ +# How to... + +Here you can find information on how to accomplish specific scenario's. diff --git a/docs/src/common-library/howto/multiple-subpath.md b/docs/src/common-library/howto/multiple-subpath.md new file mode 100644 index 00000000..d00d21b1 --- /dev/null +++ b/docs/src/common-library/howto/multiple-subpath.md @@ -0,0 +1,43 @@ +# Multiple subPaths for 1 volume + +It is possible to mount multiple subPaths from the same volume to the main +container. This can be achieved by specifying `subPath` with a list +instead of a string. + +```admonish note +It is not possible to define `mountPath` at the top level when using this +feature +``` + +## Examples: + +```yaml +persistence: + config: + enabled: true + type: custom + volumeSpec: + configMap: + name: myData + subPath: + - path: myFirstScript.sh + mountPath: /data/myFirstScript.sh + - path: myCertificate.pem + mountPath: /certs/myCertificate.pem + readOnly: true +``` + +```yaml +persistence: + config: + enabled: true + type: pvc + existingClaim: myAppData + subPath: + - path: . + mountPath: /my_media + - path: Series + mountPath: /series + - path: Downloads + mountPath: /downloads +``` diff --git a/docs/common-library/introduction.md b/docs/src/common-library/introduction.md similarity index 67% rename from docs/common-library/introduction.md rename to docs/src/common-library/introduction.md index f6be33ac..16a5a0e4 100644 --- a/docs/common-library/introduction.md +++ b/docs/src/common-library/introduction.md @@ -1,10 +1,11 @@ # Common library -!!! note - The Common library chart is not meant to be installed directly, application - charts use the Common library as a dependency. - See the [app template](../../app-template/introduction) for an example how to - deploy it. +```admonish note +The Common library chart is not meant to be installed directly, application +charts use the Common library as a dependency. +See the [app template](../../app-template/introduction.md ) for an example how to +deploy it. +``` ## Background @@ -19,11 +20,12 @@ In Helm 3, their team introduced the concept of a The common library was created because I saw many charts requiring only a few select configuration options in their Helm charts. -!!! note - Take one of the many applications like `sonarr` or `nzbget`. Each of these - charts only require setting `service`, `port`, `persistence`, `ingress` - and `image` since state and app configuration is handled by the application - itself. +```admonish note +Take one of the many applications like `sonarr` or `nzbget`. Each of these +charts only require setting `service`, `port`, `persistence`, `ingress` +and `image` since state and app configuration is handled by the application +itself. +``` In order to stay somewhat DRY (Don't Repeat Yourself) and keeping with Helm 3 usage for a Library chart, I saw this pattern and decided it was worth it to diff --git a/docs/src/common-library/storage/index.md b/docs/src/common-library/storage/index.md new file mode 100644 index 00000000..4798236d --- /dev/null +++ b/docs/src/common-library/storage/index.md @@ -0,0 +1,4 @@ +# Common library Storage + +This page describes the different ways you can configure and attach storage to charts +using the common library. diff --git a/docs/src/common-library/storage/permissions.md b/docs/src/common-library/storage/permissions.md new file mode 100644 index 00000000..29291022 --- /dev/null +++ b/docs/src/common-library/storage/permissions.md @@ -0,0 +1,6 @@ +# Permissions + +Charts do not modify file or folder permissions on volumes out of the box. + +This means that you will have to make sure that your storage can be written to +by the application. diff --git a/docs/src/common-library/storage/types.md b/docs/src/common-library/storage/types.md new file mode 100644 index 00000000..8e0f4471 --- /dev/null +++ b/docs/src/common-library/storage/types.md @@ -0,0 +1,3 @@ +# Storage types + +Here you can find information on the different types of storage available in the common library chart. diff --git a/docs/src/common-library/storage/types/configmap.md b/docs/src/common-library/storage/types/configmap.md new file mode 100644 index 00000000..fc3c58e7 --- /dev/null +++ b/docs/src/common-library/storage/types/configmap.md @@ -0,0 +1,25 @@ +# ConfigMap + +In order to mount a configMap to a mount point within the Pod you can use the +`configMap` type persistence item. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `name` | Yes | Which configMap should be mounted. Supports Helm templating. | +| `defaultMode` | No | The default file access permission bit. | +| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | +| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the configMap will be read-only. | + +## Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: configMap + name: mySettings +``` + +This will mount the contents of the pre-existing `mySettings` configMap to `/config`. diff --git a/docs/src/common-library/storage/types/custom.md b/docs/src/common-library/storage/types/custom.md new file mode 100644 index 00000000..b97f2b5a --- /dev/null +++ b/docs/src/common-library/storage/types/custom.md @@ -0,0 +1,16 @@ +# Custom + +When you wish to specify a custom volume, you can use the `custom` type. +This can be used for example to mount configMap or Secret objects. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/) +for more information. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `volumeSpec` | Yes | Define the raw Volume spec here. | +| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | +| `readOnly` | No | Specify if the volume should be mounted read-only. | +| `nameOverride` | No | Override the name suffix that is used for this volume. | diff --git a/docs/src/common-library/storage/types/emptydir.md b/docs/src/common-library/storage/types/emptydir.md new file mode 100644 index 00000000..37e3964a --- /dev/null +++ b/docs/src/common-library/storage/types/emptydir.md @@ -0,0 +1,27 @@ +# Empty Dir + +Sometimes you need to share some data between containers, or need some +scratch space. That is where an emptyDir can come in. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) +for more information. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ---------------------------------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `medium` | No | Set this to `Memory` to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node. | +| `sizeLimit` | No | If the `SizeMemoryBackedVolumes` feature gate is enabled, you can specify a size for memory backed volumes. | +| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | +| `nameOverride` | No | Override the name suffix that is used for this volume. | + +## Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: emptyDir +``` + +This will create an ephemeral emptyDir volume and mount it to `/config`. diff --git a/docs/src/common-library/storage/types/hostpath.md b/docs/src/common-library/storage/types/hostpath.md new file mode 100644 index 00000000..808a9d8c --- /dev/null +++ b/docs/src/common-library/storage/types/hostpath.md @@ -0,0 +1,32 @@ +# Host path + +In order to mount a path from the node where the Pod is running you can use a +`hostPath` type persistence item. + +This can also be used to mount an attached USB device to a Pod. Note that +this will most likely also require setting an elevated `securityContext`. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) +for more information. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `hostPath` | Yes | Which path on the host should be mounted. | +| `hostPathType` | No | Specifying a hostPathType adds a check before trying to mount the path. See Kubernetes documentation for options. | +| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | +| `readOnly` | No | Specify if the volume should be mounted read-only. | +| `nameOverride` | No | Override the name suffix that is used for this volume. | + +## Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: hostPath + hostPath: /dev +``` + +This will mount the `/dev` folder from the underlying host to `/dev` in the container. diff --git a/docs/src/common-library/storage/types/nfs-share.md b/docs/src/common-library/storage/types/nfs-share.md new file mode 100644 index 00000000..75032690 --- /dev/null +++ b/docs/src/common-library/storage/types/nfs-share.md @@ -0,0 +1,30 @@ +# NFS Share + +To mount an NFS share to your Pod you can either pre-create a persistentVolumeClaim +referring to it, or you can specify an inline NFS volume: + +```admonish note +Mounting an NFS share this way does not allow for specifying mount options. +If you require these, you must create a PVC to mount the share. +``` + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | +| `enabled` | Yes | | +| `type` | Yes | | +| `server` | Yes | Host name or IP address of the NFS server. | +| `path` | Yes | The path on the server to mount. | +| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | + +## Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: nfs + server: 10.10.0.8 + path: /tank/nas/library +``` + +This will mount the NFS share `/tank/nas/library` on server `10.10.0.8` to `/config`. diff --git a/docs/src/common-library/storage/types/pvc.md b/docs/src/common-library/storage/types/pvc.md new file mode 100644 index 00000000..d9e58903 --- /dev/null +++ b/docs/src/common-library/storage/types/pvc.md @@ -0,0 +1,66 @@ +# Persistent Volume Claim + +This is probably the most common storage type, therefore it is also the +default when no `type` is specified. + +It can be attached in two ways. + +- [Dynamically provisioned](#dynamically-provisioned) +- [Existing claim](#existing-claim) + +## Dynamically provisioned + +Charts can be configured to create the required persistentVolumeClaim +manifests on the fly. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `accessMode` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | +| `size` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#resources) | +| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | +| `readOnly` | No | Specify if the volume should be mounted read-only. | +| `nameOverride` | No | Override the name suffix that is used for this volume. | +| `storageClass` | No | Storage class to use for this volume. | +| `retain` | No | Set to true to retain the PVC upon `helm uninstall`. | + +### Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: pvc + accessMode: ReadWriteOnce + size: 1Gi +``` + +This will create a 1Gi RWO PVC named `RELEASE-NAME-config` with the default +storageClass, which will mount to `/config`. + +## Existing claim + +Charts can be configured to attach to a pre-existing persistentVolumeClaim. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------------------------------------- | +| `enabled` | Yes | | +| `type` | Yes | | +| `existingClaim` | Yes | Name of the existing PVC | +| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | +| `subPath` | No | Specifies a sub-path inside the referenced volume instead of its root. | +| `readOnly` | No | Specify if the volume should be mounted read-only. | +| `nameOverride` | No | Override the name suffix that is used for this volume. | + +### Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: pvc + existingClaim: myAppData +``` + +This will mount an existing PVC named `myAppData` to `/config`. diff --git a/docs/src/common-library/storage/types/secret.md b/docs/src/common-library/storage/types/secret.md new file mode 100644 index 00000000..295313d5 --- /dev/null +++ b/docs/src/common-library/storage/types/secret.md @@ -0,0 +1,25 @@ +# Secret + +In order to mount a Secret to a mount point within the Pod you can use the +`secret` type persistence item. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | +| `enabled` | Yes | | +| `type` | Yes | | +| `name` | Yes | Which Secret should be mounted. Supports Helm templating. | +| `defaultMode` | No | The default file access permission bit. | +| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | +| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | + +## Minimal configuration: + +```yaml +persistence: + config: + enabled: true + type: secret + name: mySecret +``` + +This will mount the contents of the pre-existing `mySecret` Secret to `/config`. diff --git a/docs/index.md b/docs/src/introduction.md similarity index 71% rename from docs/index.md rename to docs/src/introduction.md index b4172bef..3b4fc267 100644 --- a/docs/index.md +++ b/docs/src/introduction.md @@ -16,6 +16,10 @@ helm repo add bjw-s http://bjw-s.github.io/helm-charts/ You can then run `helm search repo bjw-s` to search the charts. +## Support + +If you like this project, please consider supporting my work through my [GitHub sponsorship page](https://github.com/sponsors/bjw-s?frequency=one-time). + ## How do I find people running Kubernetes at home? ### Discord @@ -30,10 +34,10 @@ Have a look at people running Kubernetes at home [on GitLab](https://gitlab.com/search?search=k8s-at-home). -### Awesome Home Kubernetes +### Search -[Checkout](https://github.com/k8s-at-home/awesome-home-kubernetes) our curation -of projects and resources involving running Kubernetes at home. +You can use this following [search engine](https://nanne.dev/k8s-at-home-search/) provided by [@whazor](https://github.com/whazor) to search for public +repositories containing any application you might wish to run. ## License diff --git a/docs/theme/catppuccin-highlight.css b/docs/theme/catppuccin-highlight.css new file mode 100644 index 00000000..6c3c4fa6 --- /dev/null +++ b/docs/theme/catppuccin-highlight.css @@ -0,0 +1,359 @@ +.mocha code, +.mocha .hljs { + background: #181825; +} +.mocha code .hljs-attr, +.mocha code .hljs-string { + color: #a6e3a1; +} +.mocha code .hljs-tag { + color: #f38ba8; +} +.mocha code .hljs-name { + color: #f2cdcd; +} +.mocha pre .hljs { + background: #181825 !important; +} +.mocha pre .hljs-params { + color: #f38ba8 !important; +} +.mocha pre .hljs-built_in, +.mocha pre .hljs-selector-tag, +.mocha pre .hljs-section, +.mocha pre .hljs-link { + color: #74c7ec !important; +} +.mocha pre .hljs-keyword { + color: #cba6f7 !important; +} +.mocha pre .hljs, +.mocha pre .hljs-subst { + color: #a6adc8 !important; +} +.mocha pre .hljs-title { + color: #89b4fa !important; +} +.mocha pre .hljs-attr, +.mocha pre .hljs-meta-keyword { + color: #a6e3a1 !important; +} +.mocha pre .hljs-type { + color: #89b4fa !important; +} +.mocha pre .hljs-string { + color: #a6e3a1 !important; +} +.mocha pre .hljs-tag { + color: #f38ba8 !important; +} +.mocha pre .hljs-meta, +.mocha pre .hljs-name, +.mocha pre .hljs-symbol, +.mocha pre .hljs-bullet, +.mocha pre .hljs-addition, +.mocha pre .hljs-variable, +.mocha pre .hljs-template-tag, +.mocha pre .hljs-template-variable { + color: #f2cdcd !important; +} +.mocha pre .hljs-addition { + background-color: #181825 !important; + color: #a6e3a1 !important; +} +.mocha pre .hljs-deletion { + background-color: #181825 !important; + color: #f38ba8 !important; +} +.mocha pre .hljs-comment, +.mocha pre .hljs-quote { + color: #585b70 !important; +} +.mocha pre .hljs-keyword, +.mocha pre .hljs-selector-tag, +.mocha pre .hljs-literal, +.mocha pre .hljs-title, +.mocha pre .hljs-section, +.mocha pre .hljs-doctag, +.mocha pre .hljs-type, +.mocha pre .hljs-name, +.mocha pre .hljs-strong { + font-weight: bold !important; +} +.mocha pre .hljs-literal, +.mocha pre .hljs-number { + color: #fab387 !important; +} +.mocha pre .hljs-emphasis { + font-style: italic !important; +} + +.macchiato code, +.macchiato .hljs { + background: #1e2030; +} +.macchiato code .hljs-attr, +.macchiato code .hljs-string { + color: #a6da95; +} +.macchiato code .hljs-tag { + color: #ed8796; +} +.macchiato code .hljs-name { + color: #f0c6c6; +} +.macchiato pre .hljs { + background: #1e2030 !important; +} +.macchiato pre .hljs-params { + color: #ed8796 !important; +} +.macchiato pre .hljs-built_in, +.macchiato pre .hljs-selector-tag, +.macchiato pre .hljs-section, +.macchiato pre .hljs-link { + color: #7dc4e4 !important; +} +.macchiato pre .hljs-keyword { + color: #c6a0f6 !important; +} +.macchiato pre .hljs, +.macchiato pre .hljs-subst { + color: #a5adcb !important; +} +.macchiato pre .hljs-title { + color: #8aadf4 !important; +} +.macchiato pre .hljs-attr, +.macchiato pre .hljs-meta-keyword { + color: #a6da95 !important; +} +.macchiato pre .hljs-type { + color: #8aadf4 !important; +} +.macchiato pre .hljs-string { + color: #a6da95 !important; +} +.macchiato pre .hljs-tag { + color: #ed8796 !important; +} +.macchiato pre .hljs-meta, +.macchiato pre .hljs-name, +.macchiato pre .hljs-symbol, +.macchiato pre .hljs-bullet, +.macchiato pre .hljs-addition, +.macchiato pre .hljs-variable, +.macchiato pre .hljs-template-tag, +.macchiato pre .hljs-template-variable { + color: #f0c6c6 !important; +} +.macchiato pre .hljs-addition { + background-color: #1e2030 !important; + color: #a6da95 !important; +} +.macchiato pre .hljs-deletion { + background-color: #1e2030 !important; + color: #ed8796 !important; +} +.macchiato pre .hljs-comment, +.macchiato pre .hljs-quote { + color: #5b6078 !important; +} +.macchiato pre .hljs-keyword, +.macchiato pre .hljs-selector-tag, +.macchiato pre .hljs-literal, +.macchiato pre .hljs-title, +.macchiato pre .hljs-section, +.macchiato pre .hljs-doctag, +.macchiato pre .hljs-type, +.macchiato pre .hljs-name, +.macchiato pre .hljs-strong { + font-weight: bold !important; +} +.macchiato pre .hljs-literal, +.macchiato pre .hljs-number { + color: #f5a97f !important; +} +.macchiato pre .hljs-emphasis { + font-style: italic !important; +} + +.frappe code, +.frappe .hljs { + background: #292c3c; +} +.frappe code .hljs-attr, +.frappe code .hljs-string { + color: #a6d189; +} +.frappe code .hljs-tag { + color: #e78284; +} +.frappe code .hljs-name { + color: #eebebe; +} +.frappe pre .hljs { + background: #292c3c !important; +} +.frappe pre .hljs-params { + color: #e78284 !important; +} +.frappe pre .hljs-built_in, +.frappe pre .hljs-selector-tag, +.frappe pre .hljs-section, +.frappe pre .hljs-link { + color: #85c1dc !important; +} +.frappe pre .hljs-keyword { + color: #ca9ee6 !important; +} +.frappe pre .hljs, +.frappe pre .hljs-subst { + color: #a5adce !important; +} +.frappe pre .hljs-title { + color: #8caaee !important; +} +.frappe pre .hljs-attr, +.frappe pre .hljs-meta-keyword { + color: #a6d189 !important; +} +.frappe pre .hljs-type { + color: #8caaee !important; +} +.frappe pre .hljs-string { + color: #a6d189 !important; +} +.frappe pre .hljs-tag { + color: #e78284 !important; +} +.frappe pre .hljs-meta, +.frappe pre .hljs-name, +.frappe pre .hljs-symbol, +.frappe pre .hljs-bullet, +.frappe pre .hljs-addition, +.frappe pre .hljs-variable, +.frappe pre .hljs-template-tag, +.frappe pre .hljs-template-variable { + color: #eebebe !important; +} +.frappe pre .hljs-addition { + background-color: #292c3c !important; + color: #a6d189 !important; +} +.frappe pre .hljs-deletion { + background-color: #292c3c !important; + color: #e78284 !important; +} +.frappe pre .hljs-comment, +.frappe pre .hljs-quote { + color: #626880 !important; +} +.frappe pre .hljs-keyword, +.frappe pre .hljs-selector-tag, +.frappe pre .hljs-literal, +.frappe pre .hljs-title, +.frappe pre .hljs-section, +.frappe pre .hljs-doctag, +.frappe pre .hljs-type, +.frappe pre .hljs-name, +.frappe pre .hljs-strong { + font-weight: bold !important; +} +.frappe pre .hljs-literal, +.frappe pre .hljs-number { + color: #ef9f76 !important; +} +.frappe pre .hljs-emphasis { + font-style: italic !important; +} + +.latte code, +.latte .hljs { + background: #e6e9ef; +} +.latte code .hljs-attr, +.latte code .hljs-string { + color: #40a02b; +} +.latte code .hljs-tag { + color: #d20f39; +} +.latte code .hljs-name { + color: #dd7878; +} +.latte pre .hljs { + background: #e6e9ef !important; +} +.latte pre .hljs-params { + color: #d20f39 !important; +} +.latte pre .hljs-built_in, +.latte pre .hljs-selector-tag, +.latte pre .hljs-section, +.latte pre .hljs-link { + color: #209fb5 !important; +} +.latte pre .hljs-keyword { + color: #8839ef !important; +} +.latte pre .hljs, +.latte pre .hljs-subst { + color: #6c6f85 !important; +} +.latte pre .hljs-title { + color: #1e66f5 !important; +} +.latte pre .hljs-attr, +.latte pre .hljs-meta-keyword { + color: #40a02b !important; +} +.latte pre .hljs-type { + color: #1e66f5 !important; +} +.latte pre .hljs-string { + color: #40a02b !important; +} +.latte pre .hljs-tag { + color: #d20f39 !important; +} +.latte pre .hljs-meta, +.latte pre .hljs-name, +.latte pre .hljs-symbol, +.latte pre .hljs-bullet, +.latte pre .hljs-addition, +.latte pre .hljs-variable, +.latte pre .hljs-template-tag, +.latte pre .hljs-template-variable { + color: #dd7878 !important; +} +.latte pre .hljs-addition { + background-color: #e6e9ef !important; + color: #40a02b !important; +} +.latte pre .hljs-deletion { + background-color: #e6e9ef !important; + color: #d20f39 !important; +} +.latte pre .hljs-comment, +.latte pre .hljs-quote { + color: #acb0be !important; +} +.latte pre .hljs-keyword, +.latte pre .hljs-selector-tag, +.latte pre .hljs-literal, +.latte pre .hljs-title, +.latte pre .hljs-section, +.latte pre .hljs-doctag, +.latte pre .hljs-type, +.latte pre .hljs-name, +.latte pre .hljs-strong { + font-weight: bold !important; +} +.latte pre .hljs-literal, +.latte pre .hljs-number { + color: #fe640b !important; +} +.latte pre .hljs-emphasis { + font-style: italic !important; +} diff --git a/docs/theme/catppuccin.css b/docs/theme/catppuccin.css new file mode 100644 index 00000000..f577fd8b --- /dev/null +++ b/docs/theme/catppuccin.css @@ -0,0 +1,123 @@ +.mocha { + --bg: #1e1e2e; + --fg: #cdd6f4; + --sidebar-bg: #181825; + --sidebar-fg: #cdd6f4; + --sidebar-non-existant: #6c7086; + --sidebar-active: #f5e0dc; + --sidebar-spacer: #6c7086; + --scrollbar: #6c7086; + --icons: #6c7086; + --icons-hover: #7f849c; + --links: #89b4fa; + --inline-code-color: #fab387; + --theme-popup-bg: #181825; + --theme-popup-border: #6c7086; + --theme-hover: #6c7086; + --quote-bg: #181825; + --quote-border: #11111b; + --table-border-color: #11111b; + --table-header-bg: #181825; + --table-alternate-bg: #11111b; + --searchbar-border-color: #11111b; + --searchbar-bg: #181825; + --searchbar-fg: #cdd6f4; + --searchbar-shadow-color: #11111b; + --searchresults-header-fg: #cdd6f4; + --searchresults-border-color: #11111b; + --searchresults-li-bg: #1e1e2e; + --search-mark-bg: #fab387; +} + +.macchiato { + --bg: #24273a; + --fg: #cad3f5; + --sidebar-bg: #1e2030; + --sidebar-fg: #cad3f5; + --sidebar-non-existant: #6e738d; + --sidebar-active: #f4dbd6; + --sidebar-spacer: #6e738d; + --scrollbar: #6e738d; + --icons: #6e738d; + --icons-hover: #8087a2; + --links: #8aadf4; + --inline-code-color: #f5a97f; + --theme-popup-bg: #1e2030; + --theme-popup-border: #6e738d; + --theme-hover: #6e738d; + --quote-bg: #1e2030; + --quote-border: #181926; + --table-border-color: #181926; + --table-header-bg: #1e2030; + --table-alternate-bg: #181926; + --searchbar-border-color: #181926; + --searchbar-bg: #1e2030; + --searchbar-fg: #cad3f5; + --searchbar-shadow-color: #181926; + --searchresults-header-fg: #cad3f5; + --searchresults-border-color: #181926; + --searchresults-li-bg: #24273a; + --search-mark-bg: #f5a97f; +} + +.frappe { + --bg: #303446; + --fg: #c6d0f5; + --sidebar-bg: #292c3c; + --sidebar-fg: #c6d0f5; + --sidebar-non-existant: #737994; + --sidebar-active: #f2d5cf; + --sidebar-spacer: #737994; + --scrollbar: #737994; + --icons: #737994; + --icons-hover: #838ba7; + --links: #8caaee; + --inline-code-color: #ef9f76; + --theme-popup-bg: #292c3c; + --theme-popup-border: #737994; + --theme-hover: #737994; + --quote-bg: #292c3c; + --quote-border: #232634; + --table-border-color: #232634; + --table-header-bg: #292c3c; + --table-alternate-bg: #232634; + --searchbar-border-color: #232634; + --searchbar-bg: #292c3c; + --searchbar-fg: #c6d0f5; + --searchbar-shadow-color: #232634; + --searchresults-header-fg: #c6d0f5; + --searchresults-border-color: #232634; + --searchresults-li-bg: #303446; + --search-mark-bg: #ef9f76; +} + +.latte { + --bg: #eff1f5; + --fg: #4c4f69; + --sidebar-bg: #e6e9ef; + --sidebar-fg: #4c4f69; + --sidebar-non-existant: #9ca0b0; + --sidebar-active: #dc8a78; + --sidebar-spacer: #9ca0b0; + --scrollbar: #9ca0b0; + --icons: #9ca0b0; + --icons-hover: #8c8fa1; + --links: #1e66f5; + --inline-code-color: #fe640b; + --theme-popup-bg: #e6e9ef; + --theme-popup-border: #9ca0b0; + --theme-hover: #9ca0b0; + --quote-bg: #e6e9ef; + --quote-border: #dce0e8; + --table-border-color: #dce0e8; + --table-header-bg: #e6e9ef; + --table-alternate-bg: #dce0e8; + --searchbar-border-color: #dce0e8; + --searchbar-bg: #e6e9ef; + --searchbar-fg: #4c4f69; + --searchbar-shadow-color: #dce0e8; + --searchresults-header-fg: #4c4f69; + --searchresults-border-color: #dce0e8; + --searchresults-li-bg: #eff1f5; + --search-mark-bg: #fe640b; +} diff --git a/docs/theme/index.hbs b/docs/theme/index.hbs new file mode 100644 index 00000000..cf1d678e --- /dev/null +++ b/docs/theme/index.hbs @@ -0,0 +1,313 @@ + + + + + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + {{#if copy_fonts}} + + {{/if}} + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+ + +
+
+ + + +
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + + +