From 9335520b6eb974844fa21fda8ca9345a7a0b5f38 Mon Sep 17 00:00:00 2001 From: Alexis VIALARET Date: Mon, 20 May 2024 14:59:02 +0200 Subject: [PATCH] add: skaff doc template --- .github/workflows/deploy_docs.yaml | 26 ++++++++++ docs/images/favicon.svg | 11 +++++ docs/images/logo.svg | 36 ++++++++++++++ docs/stylesheets/skaff.css | 73 ++++++++++++++++++++++++++++ mkdocs.yml | 76 ++++++++++++++++++++++++++++-- 5 files changed, 219 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy_docs.yaml create mode 100644 docs/images/favicon.svg create mode 100644 docs/images/logo.svg create mode 100644 docs/stylesheets/skaff.css diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml new file mode 100644 index 0000000..d8692f1 --- /dev/null +++ b/.github/workflows/deploy_docs.yaml @@ -0,0 +1,26 @@ +name: Deploy MkDocs to GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy-docs: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install mkdocs pymdown-extensions termynal mkdocs-material + - name: Deploying MkDocs documentation + run: | + mkdocs build + mkdocs gh-deploy --force \ No newline at end of file diff --git a/docs/images/favicon.svg b/docs/images/favicon.svg new file mode 100644 index 0000000..247c970 --- /dev/null +++ b/docs/images/favicon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 0000000..146732c --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/stylesheets/skaff.css b/docs/stylesheets/skaff.css new file mode 100644 index 0000000..b744c67 --- /dev/null +++ b/docs/stylesheets/skaff.css @@ -0,0 +1,73 @@ +/* https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors */ +:root { + --md-primary-fg-color: #142146; + --md-accent-fg-color: #fc2c7f; +} + + /* Revert hue value to that of pre mkdocs-material v9.4.0 */ + [data-md-color-scheme="slate"] { + /* Hue taken from hsl of #142146, used for bg on website*/ + --md-hue: 227; + /* Increase the lightness by 5%, opacity by 0.2 */ + --md-default-fg-color: hsla(var(--md-hue),15%,95%,1.0); + --md-default-fg-color--light: hsla(var(--md-hue),15%,95%,0.76); + --md-default-fg-color--lighter: hsla(var(--md-hue),15%,95%,0.52); + --md-default-fg-color--lightest: hsla(var(--md-hue),15%,95%,0.32); + /* Change the saturation and lightness to match #142146 */ + --md-default-bg-color: hsla(var(--md-hue),87%,6%,1); + --md-default-bg-color--light: hsla(var(--md-hue),87%,6%,0.54); + --md-default-bg-color--lighter: hsla(var(--md-hue),87%,6%,0.26); + --md-default-bg-color--lightest: hsla(var(--md-hue),87%,6%,0.07); + /* Increase the opacity of code to 1.0 */ + --md-code-fg-color: hsla(var(--md-hue),18%,86%,1.0); + --md-code-hl-comment-color: #666666; + --md-typeset-a-color: #65cccc; + } + + [data-md-color-scheme="default"] { + --md-hue: 227; + --md-default-bg-color: hsla(var(--md-hue),100%,96%,1); + --md-typeset-a-color: #65cccc; + + --md-code-fg-color: hsla(var(--md-hue),18%,86%,1.0); + --md-code-bg-color: #262a32; + --md-code-hl-name-color: var(--md-code-fg-color); + --md-code-hl-operator-color: var(--md-code-fg-color); + --md-code-hl-punctuation-color: var(--md-code-fg-color); + --md-code-hl-comment-color: #666666; + --md-code-hl-variable-color: var(--md-code-fg-color); + } + + .custom-source-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + gap: 12px; + } + + @media screen and (min-width: 60em) { + .md-header__source { + box-sizing: content-box; + max-width: 11.7rem; + width: 11.7rem; + } + } + + .custom-login-button { + font-size: 0.8rem; + font-weight: 700; + float: right; + border: 2px solid #fff; + border-radius: 8px; + padding: 6px 12px; + transition: opacity .25s; + } + + .custom-login-button:hover { + opacity: 0.7 + } + + /* Hide all ToC entries for parameters. */ + li.md-nav__item>a[href*="("] { + display: none; + } diff --git a/mkdocs.yml b/mkdocs.yml index c641157..112e3ef 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,14 +1,84 @@ -# This is only used for documentation generation in Roadie. It is not part of the vertex starter kit. +# This is only used for documentation generation in Skaff. It is not part of the vertex starter kit. site_name: Vertex pipelines starter kit repo_name: artefactory/vertex-pipeline-starter-kit repo_url: https://github.com/artefactory/vertex-pipeline-starter-kit +theme: + name: material + logo: images/logo.svg + favicon: images/favicon.svg + font: + text: Oxygen + features: + - search.suggest + - search.highlight + - content.code.annotate + - content.code.copy + - content.code.select + - navigation.indexes + - navigation.path + - navigation.instant + - navigation.instant.preview + - navigation.instant.prefetch + - navigation.instant.progress + - navigation.sections + - navigation.tracking + - toc.follow + palette: # Light and dark mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: custom + accent: custom + toggle: + icon: material/lightbulb-outline + name: "Switch to dark mode" + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: custom + accent: custom + toggle: + icon: material/lightbulb + name: "Switch to light mode" + +extra: + # hide the "Made with Material for MkDocs" message + generator: false + analytics: + provider: google + property: G-7REH78BCSD + feedback: + title: Was this page helpful? + ratings: + - icon: material/thumb-up-outline + name: This page was helpful + data: 1@ + note: >- + Thanks for your feedback! + - icon: material/thumb-down-outline + name: This page could be improved + data: 0 + note: >- + Thanks for your feedback! Help us improve this page by + opening an issue. + +extra_css: + - stylesheets/skaff.css + plugins: - - techdocs-core + - termynal + - search markdown_extensions: - - pymdownx.snippets: + - admonition + - attr_list + - md_in_html + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist + - pymdownx.snippets + nav: - Home: index.md