Add Hugo-based (https://gohugo.io) documentation

This commit is contained in:
Vitaliy Filippov
2024-09-06 00:11:45 +03:00
parent d5f7005ddd
commit c853d18b49
42 changed files with 892 additions and 2 deletions
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/nodejs
const fs = require('fs');
const yaml = require('yaml');
const L = {
en: {},
ru: {
Type: 'Тип',
Default: 'Значение по умолчанию',
Minimum: 'Минимальное значение',
},
};
const types = {
en: {
string: 'string',
bool: 'boolean',
int: 'integer',
sec: 'seconds',
ms: 'milliseconds',
us: 'microseconds',
},
ru: {
string: 'строка',
bool: 'булево (да/нет)',
int: 'целое число',
sec: 'секунды',
ms: 'миллисекунды',
us: 'микросекунды',
},
};
const params_files = fs.readdirSync(__dirname+'/params')
.filter(f => f.substr(-4) == '.yml')
.map(f => f.substr(0, f.length-4));
for (const file of params_files)
{
const cfg = yaml.parse(fs.readFileSync(__dirname+'/params/'+file+'.yml', { encoding: 'utf-8' }));
for (const lang in types)
{
let out = '\n\n{{< toc >}}';
for (const c of cfg)
{
out += `\n\n## ${c.name}\n\n`;
out += `- ${L[lang]['Type'] || 'Type'}: ${c["type_"+lang] || types[lang][c.type] || c.type}\n`;
if (c.default !== undefined)
out += `- ${L[lang]['Default'] || 'Default'}: ${c.default}\n`;
if (c.min !== undefined)
out += `- ${L[lang]['Minimum'] || 'Minimum'}: ${c.min}\n`;
out += `\n`+(c["info_"+lang] || c["info"]).replace(/\s+$/, '');
}
const head = fs.readFileSync(__dirname+'/params/head/'+file+'.'+lang+'.md', { encoding: 'utf-8' });
fs.writeFileSync(__dirname+'/hugo/content/config/'+file+'.'+lang+'.md', head.replace(/\s+$/, '')+out+"\n");
}
}
+6
View File
@@ -0,0 +1,6 @@
---
title: Common Parameters
weight: 1
---
These are the most common parameters which apply to all components of Vitastor.
+6
View File
@@ -0,0 +1,6 @@
---
title: Общие параметры
weight: 1
---
Это наиболее общие параметры, используемые всеми компонентами Vitastor.
+7
View File
@@ -0,0 +1,7 @@
---
title: Cluster-Wide Disk Layout Parameters
weight: 2
---
These parameters apply to clients and OSDs, are fixed at the moment of OSD drive
initialization and can't be changed after it without losing data.
+7
View File
@@ -0,0 +1,7 @@
---
title: Дисковые параметры уровня кластера
weight: 2
---
Данные параметры используются клиентами и OSD, задаются в момент инициализации
диска OSD и не могут быть изменены после этого без потери данных.
+7
View File
@@ -0,0 +1,7 @@
---
title: OSD Disk Layout Parameters
weight: 3
---
These parameters apply to OSDs, are fixed at the moment of OSD drive
initialization and can't be changed after it without losing data.
+8
View File
@@ -0,0 +1,8 @@
---
title: Дисковые параметры OSD
weight: 3
---
Данные параметры используются только OSD и, также как и общекластерные
дисковые параметры, задаются в момент инициализации дисков OSD и не могут быть
изменены после этого без потери данных.
+6
View File
@@ -0,0 +1,6 @@
---
title: Monitor Parameters
weight: 6
---
These parameters only apply to Monitors.
+6
View File
@@ -0,0 +1,6 @@
---
title: Параметры мониторов
weight: 6
---
Данные параметры используются только мониторами Vitastor.
+7
View File
@@ -0,0 +1,7 @@
---
title: Network Protocol Parameters
weight: 4
---
These parameters apply to clients and OSDs and affect network connection logic
between clients, OSDs and etcd.
+7
View File
@@ -0,0 +1,7 @@
---
title: Параметры сетевого протокола
weight: 4
---
Данные параметры используются клиентами и OSD и влияют на логику сетевого
взаимодействия между клиентами, OSD, а также etcd.
+7
View File
@@ -0,0 +1,7 @@
---
title: Runtime OSD Parameters
weight: 5
---
These parameters only apply to OSDs, are not fixed at the moment of OSD drive
initialization and can be changed with an OSD restart.
+8
View File
@@ -0,0 +1,8 @@
---
title: Изменяемые параметры OSD
weight: 5
---
Данные параметры используются только OSD, но, в отличие от дисковых параметров,
не фиксируются в момент инициализации дисков OSD и могут быть изменены в любой
момент с перезапуском OSD.