Skip to content

Commit bc77619

Browse files
committed
Help: Write the config file doc in English
1 parent fbfbeb3 commit bc77619

File tree

6 files changed

+282
-205
lines changed

6 files changed

+282
-205
lines changed

help/en/config_file.myco

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
= Configuration file
2+
//This article is intended for wiki administrators.//
3+
4+
The main way to configure your Mycorrhiza instance is through the **configuration file**. It is located at the root of your wiki structure and is called `config.ini`.
5+
6+
The file is generated automatically when you create a new wiki:
7+
8+
```
9+
# Generate a new wiki
10+
$ mycorrhiza bestWiki
11+
...
12+
# See what's inside
13+
$ ls bestWiki
14+
cache config.ini static wiki.git
15+
```
16+
17+
The file is written in the [[https://en.wikipedia.org/wiki/INI_file | .ini format]].
18+
19+
== Example configuration
20+
The auto-generated file is the best example (it has comments too).
21+
22+
Here's another example:
23+
```ini
24+
WikiName = My wiki
25+
NaviTitleIcon = 🐑
26+
27+
[Hyphae]
28+
HomeHypha = home
29+
UserHypha = u
30+
HeaderLinksHypha = header-links
31+
32+
[Network]
33+
HTTPPort = 8080
34+
URL = https://wiki
35+
GeminiCertificatePath = /home/wiki/gemcerts
36+
37+
[Authorization]
38+
UseRegistration = true
39+
```
40+
41+
== Fields
42+
=== Root section
43+
* `WikiName`: //string//. The name your wiki has. It is shown in the header by default and in other places. **Default:** `Mycorrhiza Wiki`.
44+
* `NaviTitleIcon`: //string//. The icon shown before the colon in the navigational titles above each hypha. You may want to use an emoji or HTML here. **Default:** `🍄` (mushroom emoji).
45+
46+
=== [Hyphae]
47+
* `HomeHypha`: //string//. The name your home hypha has. **Default:** `home`.
48+
* `UserHypha`: //string//. The name of the hypha that is parent of all user hyphae. **Default:** `u`.
49+
* `HeaderLinkHypha`: //string//. The name of the hypha where you can configure the header. There is no default.
50+
51+
=== [Network]
52+
* `HTTPPort`: //number//. What port is used for serving the web interface of Mycorrhiza. **Default:** `1737`.
53+
* `URL`: //url//. What URL is used for Opengraph and Web feed in the web interface. There is no default and you really should set it to something.
54+
55+
=== [Authorization]
56+
* `UseRegistration`: //boolean//. Whether you want unregistered visitors to be able to register themselves using the web form. **Default:** `false`.
57+
* `LimitRegistration`: //number//. There cannot be more registered users than this number. If the number is zero, there is no limit. Makes sense only when `UseRegistration` is `true`. **Default:** `0`.
58+
59+
=== [CustomScripts]
60+
You can specify URLs of JavaScript files you want to load.
61+
* `CommonScripts`: //list of url//. Comma-separated list of unquoted URLs to JS files to load on //all// pages.
62+
* `ViewScripts`: //list of urls//. Comma-separated list of unquoted URLs to JS files to load on //view// pages: `/hypha`, `/rev`.
63+
* `EditScripts`: //list of urls//. Comma-separated list of unquoted URLs to JS files to load on the `/edit` page.

l18n/l18n.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

l18n_src/en/help.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"configuration": "Configuration (for administrators)",
2323
"lock": "Lock",
2424
"whitelist": "Whitelist",
25-
"telegram": "Telegram authorization"
25+
"telegram": "Telegram authorization",
26+
"config_file": "Configuration file"
2627
}

l18n_src/ru/help.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"configuration": "Конфигурация (для администраторов)",
2323
"lock": "Блокировка",
2424
"whitelist": "Белый список",
25-
"telegram": "Авторизация через Телеграм"
25+
"telegram": "Авторизация через Телеграм",
26+
"config_file": "Файл конфигурации"
2627
}

views/stuff.qtpl

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ It outputs a poorly formatted JSON, but it works and is valid.
181181
</li>
182182
<li>{%s lc.GetWithLocale(lang, "help.configuration") %}
183183
<ul>
184+
<li><a href="/help/{%s lang %}/config_file">{%s lc.GetWithLocale(lang, "help.config_file") %}</a></li>
184185
<li><a href="/help/{%s lang %}/lock">{%s lc.GetWithLocale(lang, "help.lock") %}</a></li>
185186
<li><a href="/help/{%s lang %}/whitelist">{%s lc.GetWithLocale(lang, "help.whitelist") %}</a></li>
186187
<li><a href="/help/{%s lang %}/telegram">{%s lc.GetWithLocale(lang, "help.telegram") %}</a></li>

0 commit comments

Comments
 (0)