From fdf0c2d316af3e90bd53a4bb601f99b1a371001b Mon Sep 17 00:00:00 2001 From: Adriel Perkins Date: Thu, 2 Nov 2023 09:59:06 -0400 Subject: [PATCH] feat: cleanup workflows, remove site files, update theme --- .github/workflows/build.yml | 6 +----- .gitignore | 1 + Makefile | 2 +- docs/styles/extra.css | 23 +++++++++++++++-------- docs/styles/table.css | 7 +++---- mkdocs.yml | 30 ++++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0dccc96..506c048 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,12 +27,8 @@ jobs: uses: Gr1N/setup-poetry@v8 - name: install dependencies - run: make poetry-install + run: make build - - name: build the doc site and ensure no changes - run: | - make build - git diff -s --exit-code -- . ':(exclude)site/sitemap.xml.gz' || (echo 'Generated website is out of date, please run make build and commit changes in this PR' && exit 1) - name: upload pages artifact if: ${{ github.ref == 'refs/heads/main' }} diff --git a/.gitignore b/.gitignore index 9d12a9b..c09bad3 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,4 @@ Brewfile.lock.json # Misc tmp/ +site/ diff --git a/Makefile b/Makefile index 2630ad3..83ad568 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ poetry-install: poetry install .PHONY: build -build: +build: poetry-install poetry run mkdocs build .PHONY: serve diff --git a/docs/styles/extra.css b/docs/styles/extra.css index fdb150b..736df90 100644 --- a/docs/styles/extra.css +++ b/docs/styles/extra.css @@ -1,15 +1,22 @@ :root { /* Override the primary foreground color */ - --md-primary-fg-color: #007DAA; - --md-primary-fg-color--light: #858585; - --md-primary-fg-color--dark: #262626; - --md-primary-bg-color: #EBEBE8; - --md-primary-bg-color--light: #F8F8F8; + --md-primary-fg-color: #24AE1D; + --md-primary-fg-color--light: #858585; + --md-primary-fg-color--dark: #262626; + --md-primary-bg-color: #EBEBE8; + --md-primary-bg-color--light: #F8F8F8; /* Override the accent foreground color */ - --md-accent-fg-color: #89DF00; + --md-accent-fg-color: #24AE1D; --md-accent-fg-color--transparent: rgba(0, 125, 170, 0.1); /* This uses #007DAA at 10% opacity */ - --md-accent-bg-color: #F8F8F8; - --md-accent-bg-color--light: #F8F8F8; + --md-accent-bg-color: #F8F8F8; + --md-accent-bg-color--light: #F8F8F8; } +.md-search-result mark { + --md-accent-fg-color: #24AE1D; +} + +[data-md-color-accent=indigo] { + --md-accent-fg-color: #24AE1D; +} diff --git a/docs/styles/table.css b/docs/styles/table.css index 815e434..a6d9114 100644 --- a/docs/styles/table.css +++ b/docs/styles/table.css @@ -1,5 +1,5 @@ .highlight-bg { - background-color: #2396bc; + background-color: #24AE1D; color: #ffffff; text-align: center; /* Doesn't work */ width: 100%; /* make the background color span the width of the page */ @@ -7,7 +7,7 @@ } .highlight-hdr { - background-color: #117b9e; + background-color: #2caf25; text-align: center; /* Doesn't work */ color: #ffffff; vertical-align: middle; /* Doesn't work */ @@ -16,9 +16,8 @@ } .highlight-cell{ - background-color: #40bae3; + background-color: #3be333; text-align: center !important; /* Doesn't work */ color: #000000; vertical-align: middle; /* center the content vertically */ } - diff --git a/mkdocs.yml b/mkdocs.yml index 73efa32..e5afe77 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,6 +3,34 @@ site_name: 'Open O11y' theme: name: material custom_dir: docs/overrides + icon: + repo: fontawesome/brands/github + edit: material/pencil + view: material/eye + palette: + # Palette toggle for light mode + - scheme: default + primary: custom + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Palette toggle for dark mode + - scheme: slate + primary: custom + toggle: + icon: material/brightness-4 + name: Switch to light mode + + features: + - content.action.edit + - content.action.view + - navigation.tabs + - navigation.tabs.sticky + - navigation.footer + - navigation.instant + - navigation.expand + - navigation.path + - navigation.top markdown_extensions: - pymdownx.superfences: @@ -16,6 +44,8 @@ extra_css: - "styles/extra.css" - "styles/table.css" +repo_url: https://github.com/liatrio/openo11y.dev + nav: - 'Welcome to Open O11y': 'index.md' - 'Guidance':