From b2e8f1f5776bc98fca72defc32292a0d5ab5608f Mon Sep 17 00:00:00 2001 From: Steve <100689438+SteveRosam@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:11:51 +0100 Subject: [PATCH] Use Quix layout --- .github/workflows/build-commit-subfolder.yaml | 3 +++ .github/workflows/sync-build-deploy.yaml | 3 +++ layouts/{custom.yml => quix.yml} | 26 ++++++++++++++++++- mkdocs.yml | 4 ++- 4 files changed, 34 insertions(+), 2 deletions(-) rename layouts/{custom.yml => quix.yml} (62%) diff --git a/.github/workflows/build-commit-subfolder.yaml b/.github/workflows/build-commit-subfolder.yaml index 22b63d64..fceaaf75 100644 --- a/.github/workflows/build-commit-subfolder.yaml +++ b/.github/workflows/build-commit-subfolder.yaml @@ -72,6 +72,9 @@ jobs: # add 'social' to mkdocs.yml file under plugins - run: pip install cffi pillow cairosvg + # Material extension now part of mkdocs + - run: pip install mkdocs-material-extensions + # add mkdocs-redirects # zoom images - name: Install mkdocs-redirects diff --git a/.github/workflows/sync-build-deploy.yaml b/.github/workflows/sync-build-deploy.yaml index 6bccec99..3397657a 100644 --- a/.github/workflows/sync-build-deploy.yaml +++ b/.github/workflows/sync-build-deploy.yaml @@ -58,6 +58,9 @@ jobs: # add 'social' to mkdocs.yml file under plugins - run: pip install cffi pillow cairosvg + # Material extension now part of mkdocs + - run: pip install mkdocs-material-extensions + # add mkdocs-redirects # zoom images - name: Install mkdocs-redirects diff --git a/layouts/custom.yml b/layouts/quix.yml similarity index 62% rename from layouts/custom.yml rename to layouts/quix.yml index cc687dec..aa57da20 100644 --- a/layouts/custom.yml +++ b/layouts/quix.yml @@ -5,6 +5,30 @@ definitions: - &page_description >- {{ page.meta.get("description") or "" }} +- &page_title_with_site_name >- + {%- if not page.is_homepage -%} + {{ page.meta.get("title", page.title) }} - {{ config.site_name }} + {%- else -%} + {{ page.meta.get("title", page.title) }} + {%- endif -%} + +tags: + + og:type: website + og:title: *page_title_with_site_name + og:description: *page_description + og:image: "{{ image.url }}" + og:image:type: "{{ image.type }}" + og:image:width: "{{ image.width }}" + og:image:height: "{{ image.height }}" + og:url: "{{ page.canonical_url }}" + + twitter:card: summary_large_image + twitter:title: *page_title_with_site_name + twitter:description: *page_description + twitter:image: "{{ image.url }}" + + size: { width: 1200, height: 630 } layers: #Set background image @@ -51,4 +75,4 @@ layers: height: 2.5 font: family: Inter - style: Normal + style: Normal \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index aa799dcd..ef93fdf5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -137,7 +137,9 @@ plugins: cleanup: true - search: separator: '[\s\-\.]' - - social + - social: + cards_layout_dir: layouts + cards_layout: quix - glightbox - redirects: redirect_maps: