From 276e580ec4e69556dddae7e4db879f261686862a Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 31 Mar 2021 08:21:03 -0800 Subject: [PATCH 1/3] fix links (#239) Co-authored-by: hay-kot --- docs/docs/changelog/v0.4.0.md | 4 ++-- docs/docs/contributors/non-coders.md | 2 +- docs/docs/getting-started/updating.md | 2 +- docs/docs/site-administration/user-management.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/changelog/v0.4.0.md b/docs/docs/changelog/v0.4.0.md index e93c0b03a7ef..7f3e5eb62ca2 100644 --- a/docs/docs/changelog/v0.4.0.md +++ b/docs/docs/changelog/v0.4.0.md @@ -15,7 +15,7 @@ With the addition of group settings and a re-write of the database layer of the application backend, there is no migration path for your current site settings. Webhooks Settings, Meal Plan Categories are now managed by groups. Site settings, mainly homepage settings, are now site specific and managed by administrators. When upgrading be sure to uncheck the settings when importing your old data. #### ENV Variables - Names have been changed to be more consistent with industry standards. See the [Installation Page](/getting-started/install/) for new parameters. + Names have been changed to be more consistent with industry standards. See the [Installation Page](mealie/getting-started/install/) for new parameters. ## Bug Fixes - Fixed Search Results Limited to 100 - #198 @@ -51,7 +51,7 @@ - Create/Edit/Delete Restrictions ### Custom Pages - - You can now create custom pages that are displayed on the homepage sidebar to organize categories of recipes into pages. For example, if you have several categories that encompass "Entrée" you can group all those categories together under the "Entrée" page. See [Building Pages](/site-administration/building-pages/) for more information. + - You can now create custom pages that are displayed on the homepage sidebar to organize categories of recipes into pages. For example, if you have several categories that encompass "Entrée" you can group all those categories together under the "Entrée" page. See [Building Pages](/mealie/site-administration/building-pages/) for more information. !!! tip Note that this replaces the behavior of automatically adding categories to the sidebar. diff --git a/docs/docs/contributors/non-coders.md b/docs/docs/contributors/non-coders.md index 686d0003db10..3040cb7d2fb0 100644 --- a/docs/docs/contributors/non-coders.md +++ b/docs/docs/contributors/non-coders.md @@ -7,7 +7,7 @@ We love your input! We want to make contributing to this project as easy and tra - Submitting a fix - Proposing new features - Becoming a maintainer -- [Help translate to a new language or improve current translations](../translating) +- Help translate to a new language or improve current translations [Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/R6QDyJgbD2)! diff --git a/docs/docs/getting-started/updating.md b/docs/docs/getting-started/updating.md index 9a200153fcb6..f16f6d7cbaa8 100644 --- a/docs/docs/getting-started/updating.md +++ b/docs/docs/getting-started/updating.md @@ -11,7 +11,7 @@ ## Backing Up Your Data -[See Backups and Restore Section](/site-administration/backups-and-exports/) for details on backing up your data +[See Backups and Restore Section](/mealie/site-administration/backups-and-exports/) for details on backing up your data ## Docker For all setups using Docker the updating process look something like this diff --git a/docs/docs/site-administration/user-management.md b/docs/docs/site-administration/user-management.md index 92c47867eccc..cc73712b4705 100644 --- a/docs/docs/site-administration/user-management.md +++ b/docs/docs/site-administration/user-management.md @@ -83,4 +83,4 @@ You can easily create and manage groups via the frontend in the admin panel unde User Groups can only be deleted if no users are apart of the group. If you want to delete a group, you must assign the users to another group before removing. ## Password Reset -If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup windows click the "Reset Password" to reset a users password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](/getting-started/install/) for more details on environmental variables +If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup windows click the "Reset Password" to reset a users password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](/mealie/getting-started/install/) for more details on environmental variables From 114e87838414f7bb449b959aaa975a5ed973b5ca Mon Sep 17 00:00:00 2001 From: hay-kot Date: Wed, 31 Mar 2021 08:25:17 -0800 Subject: [PATCH 2/3] fix #238 --- docs/docs/changelog/v0.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/changelog/v0.4.0.md b/docs/docs/changelog/v0.4.0.md index 7f3e5eb62ca2..94d7aa15b494 100644 --- a/docs/docs/changelog/v0.4.0.md +++ b/docs/docs/changelog/v0.4.0.md @@ -15,7 +15,7 @@ With the addition of group settings and a re-write of the database layer of the application backend, there is no migration path for your current site settings. Webhooks Settings, Meal Plan Categories are now managed by groups. Site settings, mainly homepage settings, are now site specific and managed by administrators. When upgrading be sure to uncheck the settings when importing your old data. #### ENV Variables - Names have been changed to be more consistent with industry standards. See the [Installation Page](mealie/getting-started/install/) for new parameters. + Names have been changed to be more consistent with industry standards. See the [Installation Page](/mealie/getting-started/install/) for new parameters. ## Bug Fixes - Fixed Search Results Limited to 100 - #198 From b8cddfd6c5fd1a8785a9dff6bc3f10f2cde1b788 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 31 Mar 2021 16:31:11 -0800 Subject: [PATCH 3/3] Mkdocs Upgrade (#243) * fix links * actually fix #238 * Feature/mkdocs version bump (#240) * fix links (#239) Co-authored-by: hay-kot * fix #238 * bump mkdocs version * light/dark toggle * light/dark mode css * API_DOCS defaults to True * disable build on push for master Co-authored-by: hay-kot Co-authored-by: hay-kot --- .github/workflows/dockerbuild.prod.yml | 5 ++--- docs/docs/assets/stylesheets/custom.css | 16 +++++++++++----- docs/docs/overrides/api.html | 2 +- docs/docs/overrides/home.html | 14 ++++---------- docs/mkdocs.yml | 14 ++++++++++++++ mealie/core/config.py | 2 +- poetry.lock | 6 +++--- 7 files changed, 36 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dockerbuild.prod.yml b/.github/workflows/dockerbuild.prod.yml index f3dd6ab6e096..b07908b7c59f 100644 --- a/.github/workflows/dockerbuild.prod.yml +++ b/.github/workflows/dockerbuild.prod.yml @@ -1,9 +1,8 @@ name: Docker Build Production on: - push: - branches: - - master + release: + types: [published] jobs: build: diff --git a/docs/docs/assets/stylesheets/custom.css b/docs/docs/assets/stylesheets/custom.css index ef731b486ffa..8cad0f7baad1 100644 --- a/docs/docs/assets/stylesheets/custom.css +++ b/docs/docs/assets/stylesheets/custom.css @@ -1,14 +1,20 @@ -:root { +[data-md-color-scheme="mealie"] { --md-primary-fg-color: #e58325; --md-primary-fg-color--light: #e58325; - --md-primary-fg-color--dark: #e58325; --md-accent-fg-color: #e58325; + --md-custom-h2-color: #333; --md-accent-fg-color--light: #e58325; - --md-accent-fg-color--dark: #e58325; + --md-default-accent-bg-color: #f7fafc; } -body { - background: var(--md-primary-bg-color); +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #e58325; + --md-primary-fg-color--dark: #e58325; + --md-accent-fg-color: #e58325; + --md-accent-fg-color--dark: #e58325; + --md-custom-h2-color: rgb(167, 167, 167); + --md-default-bg-color: #1a1b1b; + --md-default-accent-bg-color: #1f1e1e; } /* frontpage elements */ diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index 50778c3f3877..5249b0d34e31 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/docs/docs/overrides/home.html b/docs/docs/overrides/home.html index bf1991973bf0..6906317c43c4 100644 --- a/docs/docs/overrides/home.html +++ b/docs/docs/overrides/home.html @@ -16,7 +16,6 @@ .tx-container { padding-top: .0rem; - background: var(--md-primary-bg-color) } .tx-hero { @@ -27,7 +26,7 @@ .tx-hero h1 { margin-bottom: 1rem; font-family: "Roboto"; - color: #30353a; + color: var(--md-custom-h2-color); font-weight: 500 } @@ -68,7 +67,7 @@ } .feature-container { - background-color: #F7FAFC; + background-color: var(--md-default-accent-bg-color); } .top-hr { @@ -85,7 +84,7 @@ } .feature-item h2 { - color: #333; + color: var(--md-custom-h2-color); font-weight: 300; font-size: 25px; white-space: nowrap; @@ -102,7 +101,7 @@ line-height: 1.8em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; - color: #111; + color: var(--webkit-print-color-adjust); margin: 0 0 10px; display: block; } @@ -162,11 +161,6 @@ flex: 1; min-width: 0; } - - /* .feature-item:hover { - background-color: #fea55247; - border-radius: 3px; - } */ } .hr { diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 332622fae6df..080c3ca3d54c 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,8 +1,22 @@ site_name: Mealie demo_url: https://mealie-demo.hay-kot.dev/ theme: + palette: + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: mealie + toggle: + icon: material/weather-night + name: Switch to dark mode + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode custom_dir: docs/overrides features: + - navigation.top - navigation.instant - navigation.expand - navigation.sections diff --git a/mealie/core/config.py b/mealie/core/config.py index e1a7fb8b1d47..aca765dfff10 100644 --- a/mealie/core/config.py +++ b/mealie/core/config.py @@ -80,7 +80,7 @@ class AppSettings: self.PRODUCTION = bool(os.environ.get("ENV")) self.IS_DEMO = os.getenv("DEMO", "False") == "True" self.API_PORT = int(os.getenv("API_PORT", 9000)) - self.API = os.getenv("API_DOCS", "False") == "True" + self.API = os.getenv("API_DOCS", "True") == "True" self.DOCS_URL = "/docs" if self.API else None self.REDOC_URL = "/redoc" if self.API else None self.SECRET = determine_secrets(app_dirs.DATA_DIR, self.PRODUCTION) diff --git a/poetry.lock b/poetry.lock index 997e7460a165..ca38853c4039 100644 --- a/poetry.lock +++ b/poetry.lock @@ -519,7 +519,7 @@ tornado = ">=5.0" [[package]] name = "mkdocs-material" -version = "7.0.6" +version = "7.1.0" description = "A Material Design theme for MkDocs" category = "dev" optional = false @@ -1577,8 +1577,8 @@ mkdocs = [ {file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"}, ] mkdocs-material = [ - {file = "mkdocs-material-7.0.6.tar.gz", hash = "sha256:e1423286dcb2ac6b9417e9e04a3f63a97f12f7f64802af09c8257561e9f3a319"}, - {file = "mkdocs_material-7.0.6-py2.py3-none-any.whl", hash = "sha256:a89f8a08a5f0a5ecce2c7a4a61a1ddd2c2cbac86f17978264eb8b8ce2ca5411b"}, + {file = "mkdocs-material-7.1.0.tar.gz", hash = "sha256:1afaa5b174265eaa4a886f73187bb0e302a9596e9bfedb5aa2cb260d8b1d994e"}, + {file = "mkdocs_material-7.1.0-py2.py3-none-any.whl", hash = "sha256:13e73b3571d36f7e4a7dc11093323cff92095f4f219a00ba19c77a5e53aa6c55"}, ] mkdocs-material-extensions = [ {file = "mkdocs-material-extensions-1.0.1.tar.gz", hash = "sha256:6947fb7f5e4291e3c61405bad3539d81e0b3cd62ae0d66ced018128af509c68f"},