diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml
index 2f3a9501f..b45dbb7a7 100644
--- a/.github/workflows/docs-publish.yml
+++ b/.github/workflows/docs-publish.yml
@@ -51,8 +51,7 @@ jobs:
mkdocs-material-
- run: sudo apt-get install pngquant
- run: pip install mike
- - run: pip install mkdocs-material
- - run: pip install "mkdocs-material[imaging]"
+ - run: pip install mkdocs-material mkdocs-redirects "mkdocs-material[imaging]"
- name: Test Docs Build
run: MKINSIDERS=false mkdocs build
deploy:
@@ -78,7 +77,7 @@ jobs:
- run: sudo apt-get install pngquant
- run: pip install mike==2.0.0
- run: pip install git+https://${GH_TOKEN}@github.com/benphelps/mkdocs-material-insiders.git
- - run: pip install "mkdocs-material[imaging]"
+ - run: pip install mkdocs-redirects "mkdocs-material[imaging]"
- name: Set Git config
run: |
git config --global user.name "GitHub Action"
diff --git a/docs/configs/index.md b/docs/configs/index.md
index a43977f69..85a1ac908 100644
--- a/docs/configs/index.md
+++ b/docs/configs/index.md
@@ -1,6 +1,7 @@
---
title: Configuration
description: Homepage Configuration
+icon: material/cog
---
Homepage uses YAML for configuration, YAML stands for "YAML Ain't Markup Language.". It's a human-readable data serialization format that's a superset of JSON. Great for config files, easy to read and write. Supports complex data types like lists and objects. **Indentation matters.** If you already use Docker Compose, you already use YAML.
diff --git a/docs/index.md b/docs/index.md
index fe1c0adf9..676086dbb 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,5 +1,7 @@
---
title: Home
+description: A modern, fully static, fast, secure, fully proxied, highly customizable application dashboard with integrations for over 100 services and translations into multiple languages.
+icon: material/home
hide:
- navigation
- toc
diff --git a/docs/installation/index.md b/docs/installation/index.md
index beb370c11..778b9ef2e 100644
--- a/docs/installation/index.md
+++ b/docs/installation/index.md
@@ -1,6 +1,7 @@
---
title: Installation
description: Docs intro
+icon: simple/docker
---
diff --git a/docs/layouts/custom.yml b/docs/layouts/custom.yml
new file mode 100644
index 000000000..d8e36c107
--- /dev/null
+++ b/docs/layouts/custom.yml
@@ -0,0 +1,252 @@
+# Copyright (c) 2016-2024 Martin Donath
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+# -----------------------------------------------------------------------------
+# Configuration
+# -----------------------------------------------------------------------------
+
+# Definitions
+definitions:
+ # Background image
+ - &background_image >-
+ {{ layout.background_image | x }}
+
+ # Background color (default: indigo)
+ - &background_color >-
+ {%- if layout.background_color -%}
+ {{ layout.background_color }}
+ {%- else -%}
+ {%- set palette = config.theme.palette or {} -%}
+ {%- if not palette is mapping -%}
+ {%- set list = palette | selectattr("primary") | list + palette -%}
+ {%- set palette = list | first -%}
+ {%- endif -%}
+ {%- set primary = palette.get("primary", "indigo") -%}
+ {%- set primary = primary.replace(" ", "-") -%}
+ {{ {
+ "red": "#ef5552",
+ "pink": "#e92063",
+ "purple": "#ab47bd",
+ "deep-purple": "#7e56c2",
+ "indigo": "#4051b5",
+ "blue": "#2094f3",
+ "light-blue": "#02a6f2",
+ "cyan": "#00bdd6",
+ "teal": "#009485",
+ "green": "#4cae4f",
+ "light-green": "#8bc34b",
+ "lime": "#cbdc38",
+ "yellow": "#ffec3d",
+ "amber": "#ffc105",
+ "orange": "#ffa724",
+ "deep-orange": "#ff6e42",
+ "brown": "#795649",
+ "grey": "#757575",
+ "blue-grey": "#546d78",
+ "black": "#000000",
+ "white": "#ffffff"
+ }[primary] or "#4051b5" }}
+ {%- endif -%}
+
+ # Text color (default: white)
+ - &color >-
+ {%- if layout.color -%}
+ {{ layout.color }}
+ {%- else -%}
+ {%- set palette = config.theme.palette or {} -%}
+ {%- if not palette is mapping -%}
+ {%- set list = palette | selectattr("primary") | list + palette -%}
+ {%- set palette = list | first -%}
+ {%- endif -%}
+ {%- set primary = palette.get("primary", "indigo") -%}
+ {%- set primary = primary.replace(" ", "-") -%}
+ {{ {
+ "red": "#ffffff",
+ "pink": "#ffffff",
+ "purple": "#ffffff",
+ "deep-purple": "#ffffff",
+ "indigo": "#ffffff",
+ "blue": "#ffffff",
+ "light-blue": "#ffffff",
+ "cyan": "#ffffff",
+ "teal": "#ffffff",
+ "green": "#ffffff",
+ "light-green": "#ffffff",
+ "lime": "#000000",
+ "yellow": "#000000",
+ "amber": "#000000",
+ "orange": "#000000",
+ "deep-orange": "#ffffff",
+ "brown": "#ffffff",
+ "grey": "#ffffff",
+ "blue-grey": "#ffffff",
+ "black": "#ffffff",
+ "white": "#000000"
+ }[primary] or "#ffffff" }}
+ {%- endif -%}
+
+ # Font family (default: Roboto)
+ - &font_family >-
+ {%- if layout.font_family -%}
+ {{ layout.font_family }}
+ {%- elif config.theme.font is mapping -%}
+ {{ config.theme.font.get("text", "Roboto") }}
+ {%- else -%}
+ Roboto
+ {%- endif -%}
+
+ # Font variant
+ - &font_variant >-
+ {%- if layout.font_variant -%}
+ {{ layout.font_variant }}
+ {%- endif -%}
+
+ # Site name
+ - &site_name >-
+ {{ config.site_name }}
+
+ # Page title
+ - &page_title >-
+ {%- if layout.title -%}
+ {{ layout.title }}
+ {%- else -%}
+ {{ page.meta.get("title", page.title) }}
+ {%- endif -%}
+
+ # Page title with site name
+ - &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 -%}
+
+ # Page description
+ - &page_description >-
+ {%- if layout.description -%}
+ {{ layout.description }}
+ {%- else -%}
+ {{ page.meta.get("description", config.site_description) | x }}
+ {%- endif -%}
+
+ # Page icon
+ - &page_icon >-
+ {{ page.meta.icon | x }}
+
+ # Logo
+ - &logo >-
+ {%- if layout.logo -%}
+ {{ layout.logo }}
+ {%- elif config.theme.logo -%}
+ {{ config.docs_dir }}/{{ config.theme.logo }}
+ {%- endif -%}
+
+ # Logo (icon)
+ - &logo_icon >-
+ {%- if not layout.logo and config.theme.icon -%}
+ {{ config.theme.icon.logo | x }}
+ {%- endif -%}
+
+# Meta tags
+tags:
+ # Open Graph
+ 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
+ twitter:card: summary_large_image
+ twitter:title: *page_title_with_site_name
+ twitter:description: *page_description
+ twitter:image: "{{ image.url }}"
+
+# -----------------------------------------------------------------------------
+# Specification
+# -----------------------------------------------------------------------------
+
+# Card size and layers
+size: { width: 1200, height: 630 }
+layers:
+ # Background
+ - background:
+ image: *background_image
+ color: *background_color
+
+ # Page icon
+ - size: { width: 630, height: 630 }
+ offset: { x: 800, y: 0 }
+ icon:
+ value: *page_icon
+ color: "#FFFFFF20"
+
+ # Logo
+ - size: { width: 64, height: 64 }
+ offset: { x: 64, y: 64 }
+ background:
+ image: *logo
+ icon:
+ value: *logo_icon
+ color: *color
+
+ # Site name
+ - size: { width: 768, height: 42 }
+ offset: { x: 160, y: 74 }
+ typography:
+ content: *site_name
+ color: *color
+ font:
+ family: *font_family
+ variant: *font_variant
+ style: Bold
+
+ # Page title
+ - size: { width: 864, height: 256 }
+ offset: { x: 62, y: 192 }
+ typography:
+ content: *page_title
+ align: start
+ color: *color
+ line:
+ amount: 3
+ height: 1.25
+ font:
+ family: *font_family
+ variant: *font_variant
+ style: Bold
+
+ # Page description
+ - size: { width: 864, height: 64 }
+ offset: { x: 64, y: 512 }
+ typography:
+ content: *page_description
+ align: start
+ color: *color
+ line:
+ amount: 2
+ height: 1.5
+ font:
+ family: *font_family
+ variant: *font_variant
+ style: Regular
diff --git a/docs/more/index.md b/docs/more/index.md
index 1b8179835..402029b3d 100644
--- a/docs/more/index.md
+++ b/docs/more/index.md
@@ -1,6 +1,7 @@
---
title: More
description: More homepage resources and guides.
+icon: material/information-slab-circle
---
Here you'll find resources and guides for Homepage, troubleshooting tips, and more.
diff --git a/docs/more/troubleshooting.md b/docs/troubleshooting/index.md
similarity index 99%
rename from docs/more/troubleshooting.md
rename to docs/troubleshooting/index.md
index 9c60a09fa..f238c997f 100644
--- a/docs/more/troubleshooting.md
+++ b/docs/troubleshooting/index.md
@@ -1,7 +1,7 @@
---
title: Troubleshooting
description: Basic Troubleshooting
-
+icon: material/message-question
hide:
- navigation
---
diff --git a/docs/widgets/authoring/api.md b/docs/widgets/authoring/api.md
index b700b19c3..54927da8b 100644
--- a/docs/widgets/authoring/api.md
+++ b/docs/widgets/authoring/api.md
@@ -1,6 +1,6 @@
---
title: API Guide
-description: How to fetch data from an API in Homepage widgets.
+description: Get comfortable with making API calls from inside your widget.
---
Homepage provides the `useWidgetAPI` hook to help you fetch data from an API. This hook insures that the data is fetched using a proxy, and is critical for security.
@@ -29,7 +29,7 @@ The `widget` argument is the metadata object for the widget. It contains informa
### `endpoint`
-The `endpoint` argument is the name of the endpoint to fetch data from. This is [defined in the widget metadata object](widget.md#endpoint). The `useWidgetAPI` hook uses this argument to determine which endpoint to fetch data from.
+The `endpoint` argument is the name of the endpoint to fetch data from. This is [defined in the widget metadata object](metadata.md#endpoint). The `useWidgetAPI` hook uses this argument to determine which endpoint to fetch data from.
If no endpoint is provided, the `useWidgetAPI` hook will call the API endpoint defined in the widget metadata object directly.
@@ -47,4 +47,4 @@ export default function Component({ service }) {
}
```
-The `params` must be [whitelisted in the widget metadata object](widget.md#params). This is done to prevent arbitrary query parameters from being passed to the API.
+The `params` must be [whitelisted in the widget metadata object](metadata.md#params). This is done to prevent arbitrary query parameters from being passed to the API.
diff --git a/docs/widgets/authoring/component.md b/docs/widgets/authoring/component.md
index e909169f2..9bbd84a41 100644
--- a/docs/widgets/authoring/component.md
+++ b/docs/widgets/authoring/component.md
@@ -1,6 +1,6 @@
---
title: Component Guide
-description: How to create and configure Homepage widget components.
+description: Learn more about the widget component in Homepage, and how to build your widget UI.
---
Homepage widgets are built using React components. These components are responsible for fetching data from the API and rendering the widget UI. Homepage provides a set of hooks and utilities to help you build your widget component.
diff --git a/docs/widgets/authoring/index.md b/docs/widgets/authoring/index.md
index cc9b934f2..0070e52dd 100644
--- a/docs/widgets/authoring/index.md
+++ b/docs/widgets/authoring/index.md
@@ -1,13 +1,14 @@
---
-title: Homepage Widget Guides
-description: How to create and configure Homepage widgets.
+title: Guides & Tutorials
+description: Learn how to create and customize widgets in Homepage. Explore translations, widget components, widget metadata, proxy handlers, and making API calls.
+icon: fontawesome/solid/graduation-cap
---
Widgets are a core component of Homepage. They are used to display information about your system, services, and environment.
## Overview
-If you are new to Homepage widgets, and are looking to create a new widget, please follow along with the guide here: [Widget Guide](guide.md).
+If you are new to Homepage widgets, and are looking to create a new widget, please follow along with the guide here: [Widget Tutorial](tutorial.md).
### Translations
@@ -27,7 +28,7 @@ If you are looking to learn more about widget components, please refer to the gu
Widget metadata defines the configuration of the widget. It defines the API endpoint to fetch data from, the proxy handler to use, and any data mappings.
-If you are looking to learn more about widget metadata, endpoint and data mapping, please refer to the guide here: [Metadata Guide](widget.md).
+If you are looking to learn more about widget metadata, endpoint and data mapping, please refer to the guide here: [Metadata Guide](metadata.md).
If you are looking to learn more about proxy handlers, please refer to the guide here: [Proxies Guide](proxies.md).
diff --git a/docs/widgets/authoring/widget.md b/docs/widgets/authoring/metadata.md
similarity index 98%
rename from docs/widgets/authoring/widget.md
rename to docs/widgets/authoring/metadata.md
index fd9ec0622..e67dc3962 100644
--- a/docs/widgets/authoring/widget.md
+++ b/docs/widgets/authoring/metadata.md
@@ -1,6 +1,6 @@
---
title: Metadata Guide
-description: How to create and configure Homepage widget metadata.
+description: Explore all the metadata properties that can be used to configure a widget in Homepage.
---
Here, we will go over how to create and configure Homepage widget metadata. Metadata is a JS object that contains information about the widget, such as the API endpoint, proxy handler, and mappings. This metadata is used by Homepage to fetch data from the API and pass it to the widget.
diff --git a/docs/widgets/authoring/proxies.md b/docs/widgets/authoring/proxies.md
index cf835bac2..220af4ad0 100644
--- a/docs/widgets/authoring/proxies.md
+++ b/docs/widgets/authoring/proxies.md
@@ -1,6 +1,6 @@
---
title: Proxies Guide
-description: How to use and create Homepage widget proxies.
+description: Learn about proxy handlers in Homepage, and how to securely fetch data from an API.
---
Homepage includes a set of built-in proxy handlers that can be used to fetch data from an API. We will go over how to use these proxy handlers and briefly cover how to create your own.
diff --git a/docs/widgets/authoring/guide.md b/docs/widgets/authoring/tutorial.md
similarity index 98%
rename from docs/widgets/authoring/guide.md
rename to docs/widgets/authoring/tutorial.md
index 766c8d4c5..4d3ddbb5f 100644
--- a/docs/widgets/authoring/guide.md
+++ b/docs/widgets/authoring/tutorial.md
@@ -1,6 +1,6 @@
---
-title: Widget Guide
-description: How to create a custom widget for Homepage.
+title: Widget Tutorial
+description: Follow along with this guide to learn how to create a custom widget for Homepage. We'll cover the basic structure of a widget, how to use translations, and how to fetch data from an API.
---
In this guide, we'll walk through the process of creating a custom widget for Homepage. We'll cover the basic structure of a widget, how to use translations, and how to fetch data from an API. By the end of this guide, you'll have a solid understanding of how to build your own custom widget.
diff --git a/docs/widgets/index.md b/docs/widgets/index.md
index 69f95d021..bf42bc165 100644
--- a/docs/widgets/index.md
+++ b/docs/widgets/index.md
@@ -1,6 +1,7 @@
---
title: Widgets
-description: Homepage info and status widgets.
+description: Find information on how to configure specific widgets in Homepage.
+icon: material/widgets
---
Homepage has two types of widgets: info and service. Below we'll cover each type and how to configure them.
diff --git a/mkdocs.yml b/mkdocs.yml
index 0f440f8df..9876af4d0 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,4 +1,4 @@
-site_name: homepage
+site_name: Homepage
# Project information
site_url: https://gethomepage.dev/
@@ -144,6 +144,7 @@ nav:
- widgets/services/uptimerobot.md
- widgets/services/urbackup.md
- widgets/services/watchtower.md
+ - widgets/services/wgeasy.md
- widgets/services/whatsupdocker.md
- widgets/services/xteve.md
- "Information Widgets":
@@ -160,15 +161,18 @@ nav:
- widgets/info/search.md
- widgets/info/unifi_controller.md
- widgets/info/weather.md
- - "Guides":
+ - "Learn":
- widgets/authoring/index.md
- - widgets/authoring/guide.md
- - widgets/authoring/component.md
- - widgets/authoring/widget.md
- - widgets/authoring/proxies.md
- - widgets/authoring/api.md
- - widgets/authoring/translations.md
- - more/troubleshooting.md
+ - "Tutorials":
+ - widgets/authoring/tutorial.md
+ - "Guides":
+ - widgets/authoring/component.md
+ - widgets/authoring/metadata.md
+ - widgets/authoring/proxies.md
+ - widgets/authoring/api.md
+ - widgets/authoring/translations.md
+ - "Troubleshooting":
+ - troubleshooting/index.md
- "More":
- more/index.md
- more/development.md
@@ -259,7 +263,8 @@ plugins:
- optimize
- typeset
- social:
- cards_layout: default/variant
+ cards_layout_dir: docs/layouts
+ cards_layout: custom
cards_layout_options:
background_image: docs/assets/BlossomValley.jpg
background_color: "rgba(13, 29, 41, 128)"
@@ -270,3 +275,6 @@ plugins:
- stemmer
- stopWordFilter
- trimmer
+ - redirects:
+ redirect_maps:
+ "more/troubleshooting.md": "troubleshooting/index.md"