Skip to content

Commit

Permalink
docs: service tags
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Mar 15, 2024
1 parent 2051cee commit 4520240
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* 🌎 **Multi-language**. Supports multiple languages.
* 🎨 **Themes**. Customize the look to your liking.
* 🗂️ **Grouping**. Create custom service groups.
* 🏷️ **Tags**. Add tags to your services.
* 👌 **Easy setup**. A few lines of yaml and your homepage is ready to go.
* 🚀 **Fast**. Everything is fast and free of hang-ups.
* 🐳 **Docker**. Optimized docker images for popular platforms.
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig({
items: [
{ text: 'Configuration', link: '/configuration' },
{ text: 'Icons', link: '/icons' },
{ text: 'Tags', link: '/tags' },
{ text: 'Favicons', link: '/favicons' },
],
},
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig({
items: [
{ text: 'Конфигурация', link: '/configuration' },
{ text: 'Иконки', link: '/icons' },
{ text: 'Теги', link: '/tags' },
{ text: 'Логотип', link: '/favicons' },
],
},
Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ features:
- title: Grouping
icon: 🗂
details: Create custom service groups.
- title: Tags
icon: 🏷️
details: Add tags to your services.
- title: Easy setup
icon: 👌
details: A few lines of yaml and your homepage is ready to go.
Expand Down
Binary file added docs/public/reference/tags-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/reference/tags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ Default: `_blank`
If a field is defined in the service `target` it will be prioritized. More details can be found in the [basic service](../services/base.md#target).
:::

## Tags <in-version value="0.10.0" />

Tags allow you to differentiate between services.

```yaml
tags:
- name: Home
color: green
- name: Work
color: blue
```

::: info
More details can be found in the [tags](../reference/tags.md) section.
:::

## Services

All services that are displayed on the home page are set in this parameter.
Expand Down
67 changes: 67 additions & 0 deletions docs/reference/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Tags <in-version value="0.10.0" />

<preview-image name="reference/tags" />

Tags allow you to differentiate between services. It is quite convenient when you have several services that belong to the same project.

## Name

The name of the tag.

```yaml
name: Home
```
To work correctly, the tag name must be unique.
## Color
Color of the tag.
```yaml
color: green
```
Values: `red`, `orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`

Default: `blue`

## Examples

Two variants of using tags are presented. These examples can be used together.

### Global tags

If you have common tags, it's convenient to declare them at the beginning of the file and use them everywhere.

```yaml
tags:
- name: Home
color: green
services:
- title: Home Assistant
description: Home automation
link: https://home-assistant.home.local/
tags:
- Home
- title: Grafana
description: Metrics dashboard
link: https://grafana.home.local/
tags:
- Home
```

### Local tags

If you don't have common tags, it is convenient to use local tags. They are declared inside the service and are available only for it.

```yaml
services:
- title: Home Assistant
description: Home automation
link: https://home-assistant.home.local/
tags:
- name: Home
color: green
```
3 changes: 3 additions & 0 deletions docs/ru/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ features:
- title: Группировка
icon: 🗂
details: Создавайте группы сервисов
- title: Теги
icon: 🏷️
details: Добавьте теги к вашим сервисам.
- title: Простая настройка
icon: 👌
details: Несколько строк yaml - и ваша домашняя страница готова к работе.
Expand Down
16 changes: 16 additions & 0 deletions docs/ru/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ behaviour:
Если в сервисе определено поле `target`, то оно будет являться приоритетным. Подробнее можно прочитать в [базовом сервисе](../services/base.md#target)
:::

## Теги <in-version value="0.10.0" />

Теги позволяют разграничивать сервисы.

```yaml
tags:
- name: Домашние
color: green
- name: Рабочее
color: blue
```

::: info Информация
Более подробно о тегах можно прочитать в [разделе](../reference/tags.md).
:::

## Сервисы

Все сервисы, которые отображаются на главной странице задаются в данном параметре.
Expand Down
67 changes: 67 additions & 0 deletions docs/ru/reference/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Теги <in-version value="0.10.0" />

<preview-image name="reference/tags" />

Теги позволяют разграничивать сервисы. Довольно удобно, когда у вас есть несколько сервисов, которые относятся к одному и тому же проекту.

## Название

Название тега.

```yaml
name: Дом
```
Для корректной работы, название тега должно быть уникальным.
## Цвет
Цвет тега.
```yaml
color: green
```
Поддерживаемые значения: `red`, `orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`

Значение по умолчанию: `blue`

## Примеры

Представлено два варианта использования тегов. Данные примеры можно использовать вместе.

### Глобальные теги

Если у вас есть общие теги, то удобно объявить их в начале файла и использовать везде.

```yaml
tags:
- name: Дом
color: green
services:
- title: Home Assistant
description: Автоматизация дома
link: https://home-assistant.home.local/
tags:
- Дом
- title: Grafana
description: Визуализация данных
link: https://grafana.home.local/
tags:
- Дом
```

### Локальные теги

Если у вас нет общих тегов, то удобно использовать локальные теги. Они объявляются внутри сервиса и доступны только для него.

```yaml
services:
- title: Home Assistant
description: Автоматизация дома
link: https://home-assistant.home.local/
tags:
- name: Дом
color: green
```
21 changes: 21 additions & 0 deletions docs/ru/services/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ icon:
Подробнее описано в разделе [иконки](../reference/icons.md).
:::

## Теги <in-version value="0.10.0" />

Теги позволяют разграничивать сервисы. Довольно удобно, когда у вас есть несколько сервисов, которые относятся к одному и тому же проекту.

```yaml
tags:
- name: Дом
color: green
```

или из глобальных тегов:

```yaml
tags:
- Дом
```

::: warning Настройка
Подробнее описано в разделе [теги](../reference/tags.md).
:::

## Статус

Mafl умеет отслеживать работоспособность сервисов по ссылке, которую вы указали.
Expand Down
21 changes: 21 additions & 0 deletions docs/services/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ icon:
See [icons](../reference/icons.md) for details.
:::

## Tags <in-version value="0.10.0" />

Tags allow you to differentiate between services. It is quite convenient when you have several services that belong to the same project.

```yaml
tags:
- name: Home
color: green
```

or just a list of tags:

```yaml
tags:
- Home
```

::: warning Settings
See [tags](../reference/tags.md) for details.
:::

## Status

Mafl knows how to check the health of the services in the link you provided.
Expand Down

0 comments on commit 4520240

Please sign in to comment.