Skip to content

Commit 4520240

Browse files
author
hywax
committed
docs: service tags
1 parent 2051cee commit 4520240

File tree

13 files changed

+217
-0
lines changed

13 files changed

+217
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
* 🌎 **Multi-language**. Supports multiple languages.
3939
* 🎨 **Themes**. Customize the look to your liking.
4040
* 🗂️ **Grouping**. Create custom service groups.
41+
* 🏷️ **Tags**. Add tags to your services.
4142
* 👌 **Easy setup**. A few lines of yaml and your homepage is ready to go.
4243
* 🚀 **Fast**. Everything is fast and free of hang-ups.
4344
* 🐳 **Docker**. Optimized docker images for popular platforms.

Diff for: docs/.vitepress/locales/en.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
items: [
3535
{ text: 'Configuration', link: '/configuration' },
3636
{ text: 'Icons', link: '/icons' },
37+
{ text: 'Tags', link: '/tags' },
3738
{ text: 'Favicons', link: '/favicons' },
3839
],
3940
},

Diff for: docs/.vitepress/locales/ru.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
items: [
3535
{ text: 'Конфигурация', link: '/configuration' },
3636
{ text: 'Иконки', link: '/icons' },
37+
{ text: 'Теги', link: '/tags' },
3738
{ text: 'Логотип', link: '/favicons' },
3839
],
3940
},

Diff for: docs/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ features:
3232
- title: Grouping
3333
icon: 🗂
3434
details: Create custom service groups.
35+
- title: Tags
36+
icon: 🏷️
37+
details: Add tags to your services.
3538
- title: Easy setup
3639
icon: 👌
3740
details: A few lines of yaml and your homepage is ready to go.

Diff for: docs/public/reference/tags-dark.png

10.4 KB
Loading

Diff for: docs/public/reference/tags.png

10.9 KB
Loading

Diff for: docs/reference/configuration.md

+16
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,22 @@ Default: `_blank`
8282
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).
8383
:::
8484

85+
## Tags <in-version value="0.10.0" />
86+
87+
Tags allow you to differentiate between services.
88+
89+
```yaml
90+
tags:
91+
- name: Home
92+
color: green
93+
- name: Work
94+
color: blue
95+
```
96+
97+
::: info
98+
More details can be found in the [tags](../reference/tags.md) section.
99+
:::
100+
85101
## Services
86102

87103
All services that are displayed on the home page are set in this parameter.

Diff for: docs/reference/tags.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Tags <in-version value="0.10.0" />
2+
3+
<preview-image name="reference/tags" />
4+
5+
Tags allow you to differentiate between services. It is quite convenient when you have several services that belong to the same project.
6+
7+
## Name
8+
9+
The name of the tag.
10+
11+
```yaml
12+
name: Home
13+
```
14+
15+
To work correctly, the tag name must be unique.
16+
17+
## Color
18+
19+
Color of the tag.
20+
21+
```yaml
22+
color: green
23+
```
24+
25+
Values: `red`, `orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`
26+
27+
Default: `blue`
28+
29+
## Examples
30+
31+
Two variants of using tags are presented. These examples can be used together.
32+
33+
### Global tags
34+
35+
If you have common tags, it's convenient to declare them at the beginning of the file and use them everywhere.
36+
37+
```yaml
38+
tags:
39+
- name: Home
40+
color: green
41+
42+
services:
43+
- title: Home Assistant
44+
description: Home automation
45+
link: https://home-assistant.home.local/
46+
tags:
47+
- Home
48+
- title: Grafana
49+
description: Metrics dashboard
50+
link: https://grafana.home.local/
51+
tags:
52+
- Home
53+
```
54+
55+
### Local tags
56+
57+
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.
58+
59+
```yaml
60+
services:
61+
- title: Home Assistant
62+
description: Home automation
63+
link: https://home-assistant.home.local/
64+
tags:
65+
- name: Home
66+
color: green
67+
```

Diff for: docs/ru/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ features:
3232
- title: Группировка
3333
icon: 🗂
3434
details: Создавайте группы сервисов
35+
- title: Теги
36+
icon: 🏷️
37+
details: Добавьте теги к вашим сервисам.
3538
- title: Простая настройка
3639
icon: 👌
3740
details: Несколько строк yaml - и ваша домашняя страница готова к работе.

Diff for: docs/ru/reference/configuration.md

+16
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,22 @@ behaviour:
8282
Если в сервисе определено поле `target`, то оно будет являться приоритетным. Подробнее можно прочитать в [базовом сервисе](../services/base.md#target)
8383
:::
8484

85+
## Теги <in-version value="0.10.0" />
86+
87+
Теги позволяют разграничивать сервисы.
88+
89+
```yaml
90+
tags:
91+
- name: Домашние
92+
color: green
93+
- name: Рабочее
94+
color: blue
95+
```
96+
97+
::: info Информация
98+
Более подробно о тегах можно прочитать в [разделе](../reference/tags.md).
99+
:::
100+
85101
## Сервисы
86102

87103
Все сервисы, которые отображаются на главной странице задаются в данном параметре.

Diff for: docs/ru/reference/tags.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Теги <in-version value="0.10.0" />
2+
3+
<preview-image name="reference/tags" />
4+
5+
Теги позволяют разграничивать сервисы. Довольно удобно, когда у вас есть несколько сервисов, которые относятся к одному и тому же проекту.
6+
7+
## Название
8+
9+
Название тега.
10+
11+
```yaml
12+
name: Дом
13+
```
14+
15+
Для корректной работы, название тега должно быть уникальным.
16+
17+
## Цвет
18+
19+
Цвет тега.
20+
21+
```yaml
22+
color: green
23+
```
24+
25+
Поддерживаемые значения: `red`, `orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`
26+
27+
Значение по умолчанию: `blue`
28+
29+
## Примеры
30+
31+
Представлено два варианта использования тегов. Данные примеры можно использовать вместе.
32+
33+
### Глобальные теги
34+
35+
Если у вас есть общие теги, то удобно объявить их в начале файла и использовать везде.
36+
37+
```yaml
38+
tags:
39+
- name: Дом
40+
color: green
41+
42+
services:
43+
- title: Home Assistant
44+
description: Автоматизация дома
45+
link: https://home-assistant.home.local/
46+
tags:
47+
- Дом
48+
- title: Grafana
49+
description: Визуализация данных
50+
link: https://grafana.home.local/
51+
tags:
52+
- Дом
53+
```
54+
55+
### Локальные теги
56+
57+
Если у вас нет общих тегов, то удобно использовать локальные теги. Они объявляются внутри сервиса и доступны только для него.
58+
59+
```yaml
60+
services:
61+
- title: Home Assistant
62+
description: Автоматизация дома
63+
link: https://home-assistant.home.local/
64+
tags:
65+
- name: Дом
66+
color: green
67+
```

Diff for: docs/ru/services/base.md

+21
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ icon:
7979
Подробнее описано в разделе [иконки](../reference/icons.md).
8080
:::
8181

82+
## Теги <in-version value="0.10.0" />
83+
84+
Теги позволяют разграничивать сервисы. Довольно удобно, когда у вас есть несколько сервисов, которые относятся к одному и тому же проекту.
85+
86+
```yaml
87+
tags:
88+
- name: Дом
89+
color: green
90+
```
91+
92+
или из глобальных тегов:
93+
94+
```yaml
95+
tags:
96+
- Дом
97+
```
98+
99+
::: warning Настройка
100+
Подробнее описано в разделе [теги](../reference/tags.md).
101+
:::
102+
82103
## Статус
83104

84105
Mafl умеет отслеживать работоспособность сервисов по ссылке, которую вы указали.

Diff for: docs/services/base.md

+21
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ icon:
7979
See [icons](../reference/icons.md) for details.
8080
:::
8181

82+
## Tags <in-version value="0.10.0" />
83+
84+
Tags allow you to differentiate between services. It is quite convenient when you have several services that belong to the same project.
85+
86+
```yaml
87+
tags:
88+
- name: Home
89+
color: green
90+
```
91+
92+
or just a list of tags:
93+
94+
```yaml
95+
tags:
96+
- Home
97+
```
98+
99+
::: warning Settings
100+
See [tags](../reference/tags.md) for details.
101+
:::
102+
82103
## Status
83104

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

0 commit comments

Comments
 (0)