docs: Some fixes for Configuration page and remove Env Var reference page #1516

Open
stratself wants to merge 6 commits from stratself/continuwuity:stratself/docs-config-env-var-fixes into main
Contributor

This pull request attempts to improve docs for the Configuration and the Env Var Reference pages. Namely, it:

  • Combines the env var prefix documentation in the former page
  • Add an order of priority section for config methods
  • Fix some wordings

I'm thinking there may need to be a separate section called Runtime configuration where both --execute and --maintenance flags are to be documented. Let me know if that makes sense

Relates #1508

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This pull request attempts to improve docs for the [Configuration](https://continuwuity.org/configuration.html) and the [Env Var Reference](continuwuity.org/reference/environment-variables.html) pages. Namely, it: - Combines the env var prefix documentation in the former page - Add an order of priority section for config methods - Fix some wordings I'm thinking there may need to be a separate section called `Runtime configuration` where both `--execute` and `--maintenance` flags are to be documented. Let me know if that makes sense <!-- Example: This pull request allows us to warp through time and space ten times faster than before by double-inverting the warp drive with hyperheated jump fluid, both making the drive faster and more efficient. This resolves the common issue where we have to wait more than 10 milliseconds to engage, use, and disengage the warp drive when travelling between galaxies. --> <!-- Closes: #... --> <!-- Fixes: #... --> <!-- Uncomment the above line(s) if your pull request fixes an issue or closes another pull request by superseding it. Replace `#...` with the issue/pr number, such as `#123`. --> Relates #1508 **Pull request checklist:** <!-- You need to complete these before your PR can be considered. If you aren't sure about some, feel free to ask for clarification in #dev:continuwuity.org. --> - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [ ] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. - [ ] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->. <!-- Notes on these requirements: - While not required, we encourage you to sign your commits with GPG or SSH to attest the authenticity of your changes. - While we allow LLM-assisted contributions, we do not appreciate contributions that are low quality, which is typical of machine-generated contributions that have not had a lot of love and care from a human. Please do not open a PR if all you have done is asked ChatGPT to tidy up the codebase with a +-100,000 diff. - In the case of code style violations, reviewers may leave review comments/change requests indicating what the ideal change would look like. For example, a reviewer may suggest you lower a log level, or use `match` instead of `if/else` etc. - In the case of code style violations, pre-commit check failures, minor things like typos/spelling errors, and in some cases commit format violations, reviewers may modify your branch directly, typically by making changes and adding a commit. Particularly in the latter case, a reviewer may rebase your commits to squash "spammy" ones (like "fix", "fix", "actually fix"), and reword commit messages that don't satisfy the format. - Pull requests MUST pass the `Checks` CI workflows to be capable of being merged. This can only be bypassed in exceptional circumstances. If your CI flakes, let us know in matrix:r/dev:continuwuity.org. - Pull requests have to be based on the latest `main` commit before being merged. If the main branch changes while you're making your changes, you should make sure you rebase on main before opening a PR. Your branch will be rebased on main before it is merged if it has fallen behind. - We typically only do fast-forward merges, so your entire commit log will be included. Once in main, it's difficult to get out cleanly, so put on your best dress, smile for the cameras! --> [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
* docs: Move detailed explanations in Env Var ref page to Config page
* docs: Add env var example for double nested configs and array
  declaration
docs: Add order of config priority and rewrite --execute command info
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m58s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 7m24s
b4d2cbc860
* fix(docs): smaller wordings

May need to consider a separate section for "runtime configuration"
i.e. --execute and --maintenance modes
@ -1,46 +1,10 @@
# Environment Variables
Owner

the existence of this file bothers me. it isn't autogenerated like the other reference documentation, and I think we'd be better off removing it and instead adding info on how to convert a config option to an env var name.

the existence of this file bothers me. it isn't autogenerated like the other reference documentation, and I think we'd be better off removing it and instead adding info on how to convert a config option to an env var name.
Author
Contributor

Removed the file and references to it. The configuration.mdx docs should sufficiently demonstrate the conversions but let me know if any other ideas

Removed the file and references to it. The configuration.mdx docs should sufficiently demonstrate the conversions but let me know if any other ideas
stratself marked this conversation as resolved
stratself force-pushed stratself/docs-config-env-var-fixes from b4d2cbc860
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m58s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 7m24s
to 73618fdbd3
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m43s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m50s
2026-03-09 16:53:49 +00:00
Compare
@ -6,3 +6,2 @@
Continuwuity uses a config file for the majority of the settings, but also supports
setting individual config options via commandline.
Continuwuity uses a config file for the majority of the settings. This is the recommended way to configure Continuwuity. Please refer to the [example config file](./reference/config.mdx) for all of those settings.
Contributor

This should be "its settings" rather than "the settings" in the first sentence, and while we're here, I'd like to question the word "majority" - what does it not use the config file for?

This should be "its settings" rather than "the settings" in the first sentence, and while we're here, I'd like to question the word "majority" - what does it *not* use the config file for?
Author
Contributor

Changed wording to "all of its settings"

Changed wording to "all of its settings"
stratself marked this conversation as resolved
@ -10,3 +9,1 @@
Please refer to the [example config
file](./reference/config.mdx) for all of those
settings.
The config file to use can be specified on the commandline when running Continuwuity by specifying the `-c`/ `--config` flag:
Contributor

i would suggest something like

You can specify the config file Continuwuity should use with the command-line flag `-c` or `--config`:
i would suggest something like ``` You can specify the config file Continuwuity should use with the command-line flag `-c` or `--config`: ```
Contributor

You left "to be used by" in there. Ideally, it should be replaced with "Continuwuity should use"

You left "to be used by" in there. Ideally, it should be replaced with "Continuwuity should use"
stratself marked this conversation as resolved
@ -17,2 +11,2 @@
used; see [the section on environment variables](#environment-variables) for
more information.
```bash
~$ ./conduwuit -c /path/to/continuwuity.toml
Contributor

The prompts are not used anywhere else in the documentation to my knowledge.

The prompts are not used anywhere else in the documentation to my knowledge.
Author
Contributor

Do you prefer if these ~$ are introduced in docs or not?

Do you prefer if these `~$` are introduced in docs or not?
Contributor

I would prefer to leave them out, personally.

I would prefer to leave them out, personally.
@ -24,1 +17,3 @@
server_name=\"example.com\"`.
## Environment variables
All of the config file settings can also be specified by using environment variables. This makes it ideal for containerised deployments and infrastructure-as-code scenarios.
Contributor

"config file settings" -> "config options"
"This makes it ideal" -> "This is ideal"

"config file settings" -> "config options" "This makes it ideal" -> "This is ideal"
stratself marked this conversation as resolved
@ -25,0 +18,4 @@
All of the config file settings can also be specified by using environment variables. This makes it ideal for containerised deployments and infrastructure-as-code scenarios.
The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to the configuration file with the syntaxes as demonstrated below:
Contributor
The environment variable names are in all caps and prefixed with `CONTINUWUITY_`.

You may not need to explicitly mention the capitalised nature of environment variables, since that is the standard, but that's up to you. As for the second sentence, "syntax" is uncountable, with the special term "syntaxes" having been created for talking about multiple languages. I would go for something like

They are mapped to configuration options with the following rules:
``` The environment variable names are in all caps and prefixed with `CONTINUWUITY_`. ``` You may not need to explicitly mention the capitalised nature of environment variables, since that is the standard, but that's up to you. As for the second sentence, "syntax" is uncountable, with the special term "syntaxes" having been created for talking about multiple languages. I would go for something like ``` They are mapped to configuration options with the following rules: ```
stratself marked this conversation as resolved
@ -25,0 +21,4 @@
The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to the configuration file with the syntaxes as demonstrated below:
```bash
# Top-level configs (those inside the [global] section) are simply capitalized
Contributor

Prefer "options" to "configs"

Prefer "options" to "configs"
stratself marked this conversation as resolved
@ -25,0 +36,4 @@
# Alternatively, you can pass a JSON object to define the entire section
# This maps to the [global.well_known] section
CONTINUWUITY_WELL_KNOWN={ client=https://example.com,server=example.com:443 }
Contributor

Does this not need to be quoted as well?

Does this not need to be quoted as well?
Author
Contributor

They do, I thought they didn't because docker-compose.yml accepts unquoted strings

They do, I thought they didn't because `docker-compose.yml` accepts unquoted strings
stratself marked this conversation as resolved
@ -25,0 +46,4 @@
- `CONDUWUIT_*` (compatibility)
- `CONDUIT_*` (legacy)
So, for example, the environment variable `CONTINUWUITY_CONFIG` can also be expressed as `CONDUWUIT_CONFIG` or `CONDUIT_CONFIG`.
Contributor

Either drop "So," or move the "for example" clause to the end of the sentence.

Either drop "So," or move the "for example" clause to the end of the sentence.
stratself marked this conversation as resolved
@ -43,0 +77,4 @@
## Execute startup commands
Continuwuity supports running admin commands on startup using the commandline argument `--execute`. The syntax of this is a standard admin command without the `!admin` prefix. For example, to create a new user:
Contributor
Continuwuity supports running admin commands on startup using the command-line flag `--execute`. This is treated as a standard admin command, without the need for the `!admin` prefix. For example, to create a new user:

It is in times like these that I wish Forgejo supported suggestions.

``` Continuwuity supports running admin commands on startup using the command-line flag `--execute`. This is treated as a standard admin command, without the need for the `!admin` prefix. For example, to create a new user: ``` It is in times like these that I wish Forgejo supported suggestions.
Author
Contributor

Applied your sentence

Applied your sentence
stratself marked this conversation as resolved
@ -43,0 +80,4 @@
Continuwuity supports running admin commands on startup using the commandline argument `--execute`. The syntax of this is a standard admin command without the `!admin` prefix. For example, to create a new user:
```
./conduwuit --execute "users create_user june"
Contributor

It may be worth adding a comment here to drive home the point, like

# equivalent to: !admin users create_user june
It may be worth adding a comment here to drive home the point, like ```bash # equivalent to: !admin users create_user june ```
stratself marked this conversation as resolved
Contributor

Of course, I know much of that is the original wording, so it's up to you whether this PR is the right place to fix the phrasing. I just felt like it was a good opportunity.

Of course, I know much of that is the original wording, so it's up to you whether this PR is the right place to fix the phrasing. I just felt like it was a good opportunity.
stratself changed title from docs: Some fixes for Configuration and Env Var reference section to docs: Some fixes for Configuration page and remove Env Var reference page 2026-03-10 08:57:45 +00:00
fix(docs): Apply some suggestions to improve docs clarity
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m7s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m59s
07f6c38caf
* fix(docs): Change all "commandline" to "command-line"
* fix(docs): Standardize "config options" as the word to use for config
  file params
stratself force-pushed stratself/docs-config-env-var-fixes from 07f6c38caf
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m7s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m59s
to d52404ead6
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m59s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m30s
2026-03-10 09:52:44 +00:00
Compare
Contributor

Would it also be an idea to have each env var in the example config? I.e.

# Max request size for file uploads in bytes. Defaults to 20MB.
#
# Environment variable: CONTINUWUITY_MAX_REQUEST_SIZE
#
#max_request_size = 20971520
Would it also be an idea to have each env var in the example config? I.e. ```toml # Max request size for file uploads in bytes. Defaults to 20MB. # # Environment variable: CONTINUWUITY_MAX_REQUEST_SIZE # #max_request_size = 20971520 ```
Contributor

@s1lv3r, I believe that defeats the purpose of documenting how to convert between them. Ideally you shouldn't have to maintain the list manually either. If you wanted to have a list of both, it would be better to generate the environment variables from the config, which I believe Jade was discussing not long ago.

@s1lv3r, I believe that defeats the purpose of documenting how to convert between them. Ideally you shouldn't have to maintain the list manually either. If you wanted to have a list of both, it would be better to generate the environment variables from the config, which I believe Jade was discussing not long ago.
fix(docs): Remove bash shell indicator
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m54s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m43s
559b1c701e
@ -25,0 +18,4 @@
All of the options in the config file can also be specified by using environment variables. This is ideal for containerised deployments and infrastructure-as-code scenarios.
The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to config options in the ways demonstrated below:
Contributor

"names is" -> "names are"

"names is" -> "names are"
@ -25,0 +21,4 @@
The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to config options in the ways demonstrated below:
```bash
# Top-level options (those inside the [global] section) are simply capitalized
Contributor

I should've noticed this last time but earlier you use "containerised" and here you use "capitalized". I believe the rest of the docs use English English, so it should be "capitalised" here.

I should've noticed this last time but earlier you use "containerised" and here you use "capitalized". I believe the rest of the docs use English English, so it should be "capitalised" here.
@ -25,0 +36,4 @@
# Alternatively, you can pass a quoted JSON object to define an entire section
# This maps to the [global.well_known] section
CONTINUWUITY_WELL_KNOWN="{ client=https://example.com,server=example.com:443 }"
Contributor

Does this example actually work? You mention a quoted JSON object, but that is not even close to being JSON. In fact, it's closer to being Nix.

If it does, the section above will need to be reworded. If it does not, the example will need to be changed.

Does this example actually work? You mention a quoted JSON object, but that is not even close to being JSON. In fact, it's closer to being Nix. If it does, the section above will need to be reworded. If it does not, the example will need to be changed.
@ -37,3 +65,1 @@
Continuwuity supports running admin commands on startup using the commandline
argument `--execute`. The most notable use for this is to create an admin user
on first startup.
The above configuration methods are prioritized, in descending order, as below:
Contributor

This should be "prioritised". Although I just double checked and there are some instances of International English in the documentation. If the maintainers have a particular preference that should be made consistent.

This should be "prioritised". Although I just double checked and there are *some* instances of International English in the documentation. If the maintainers have a particular preference that should be made consistent.
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m54s
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m43s
Required
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u stratself/docs-config-env-var-fixes:stratself-stratself/docs-config-env-var-fixes
git switch stratself-stratself/docs-config-env-var-fixes
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1516
No description provided.