Minor fixes in the config

This commit is contained in:
Pavel Djundik 2018-10-29 09:54:58 +02:00
parent 927fa92518
commit e321c7eb99
2 changed files with 24 additions and 15 deletions

View file

@ -62,16 +62,15 @@ module.exports = {
// ### `https`
//
// These three settings are used to run The Lounge using encrypted HTTP/2 on
// the server side. This will fallback to regular HTTPS if HTTP/2 is not
// supported.
// These settings are used to run The Lounge's web server using encrypted TLS.
//
// If you want more control over the webserver,
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies.html).
//
// The available keys for the `https` object are:
//
// - `enable`
// - `enable`: when set to `false`, HTTPS support is disabled
// and all other values are ignored.
// - `key`: Path to the private key file.
// - `certificate`: Path to the certificate.
// - `ca`: Path to the CA bundle.
@ -187,18 +186,19 @@ module.exports = {
//
// - `name`: Name to display in the channel list of The Lounge. This value is
// not forwarded to the IRC network.
// - `host`
// - `host`: IP address or hostname of the IRC server.
// - `port`: Usually 6667 for unencrypted connections and 6697 for
// connections encrypted with TLS.
// - `password`
// - `password`: Connection password. If the server supports SASL capability,
// then this password will be used in SASL authentication.
// - `tls`: Enable TLS connections
// - `rejectUnauthorized`: Whether the server certificate should be verified
// against the list of supplied Certificate Authorities (CAs) by your
// Node.js installation.
// - `nick`: Percent signs (`%`) will be replaced by random numbers from 0 to
// 9. For example, `Guest%%%` may become `Guest123`.
// - `username`
// - `realname`
// - `nick`: Nick name. Percent signs (`%`) will be replaced by random
// numbers from 0 to 9. For example, `Guest%%%` may become `Guest123`.
// - `username`: User name.
// - `realname`: Real name.
// - `join`: Comma-separated list of channels to auto-join once connected.
//
// This value is set to connect to the official channel of The Lounge on
@ -408,7 +408,7 @@ module.exports = {
// - `searchDN`: LDAP search DN settings. This defines the procedure by
// which The Lounge first looks for the user DN before authenticating them.
// It is ignored if `baseDN` is specified. It is an object with the
// following keys:
// following keys:
searchDN: {
// - `rootDN`: This bind DN is used to query the server for the DN of
// the user. This is supposed to be a system user that has access in

View file

@ -43,14 +43,19 @@ const extractedDoc = configContent
return acc;
}, []).join("\n");
const infoBlock = `<!--
const infoBlockHeader = `<!--
DO NOT EDIT THIS FILE MANUALLY.
Content for the following is generated by this script in the main repo:
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js
Last updated at ${Date()} by ${getGitUsername()}
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js`;
const infoBlockTop = `${infoBlockHeader}
Last updated at ${getPrettyDate()} (UTC) by ${getGitUsername()}
-->`;
const generatedContent = `${infoBlock}\n\n${extractedDoc}\n${infoBlock}\n`;
const infoBlockBottom = `${infoBlockHeader}
-->`;
const generatedContent = `${infoBlockTop}\n\n${extractedDoc}\n${infoBlockBottom}\n`;
writeFileSync(docPath, generatedContent);
@ -59,3 +64,7 @@ log.info(
`(${colors.bold(generatedContent.length)} characters) ` +
`were written in ${colors.green(docPath)}.`
);
function getPrettyDate() {
return (new Date()).toISOString().split(".")[0].replace("T", " ");
}