TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What is the best config file documentation you have seen?

30 点作者 caarlos0超过 2 年前
I run a project called goreleaser, which is configurable via YAML.<p>Since it has a lot of options, it can get confusing. I do provide a JSONSchema and a documentation page, with all available options and some commented examples.<p>Still, I feel like it could be better - especially regarding informing in which version a given option was added, discoverability, etc.. I&#x27;m just not sure how to make it so.<p>That said, I wonder: what is the best software configuration documentation you have ever seen?

9 条评论

ksaj超过 2 年前
The config file for sendmail used to be really quite good. There were more lines of explanation than there were config items. There were numerous documented example lines describing several different, but common setups. There were explanations about why you may or may not want a particular line item. There was even a preliminary mailing list handler built into the config documentation, should you want to run such a thing. It was so well documented a beginner could edit it successfully, as long as they already knew how to get out of Vim.<p>This was quite a feat, considering most people only ever saw m4 language in sendmail configs. It&#x27;s not very easy to read.
评论 #32698400 未加载
yrgulation超过 2 年前
FreeBSD’s config files spring to mind. Here is an example:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lattera&#x2F;freebsd&#x2F;blob&#x2F;master&#x2F;etc&#x2F;defaults&#x2F;rc.conf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lattera&#x2F;freebsd&#x2F;blob&#x2F;master&#x2F;etc&#x2F;defaults&#x2F;...</a><p>Also relevant is this quote from john romero, id’s co-founder:<p>“Bulletproof your engine by providing defaults upon load failure.”<p><a href="https:&#x2F;&#x2F;www.mcvuk.com&#x2F;development-news&#x2F;john-romeros-secrets-of-success-no-prototypes-great-tools-default-bagels&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mcvuk.com&#x2F;development-news&#x2F;john-romeros-secrets-...</a>
评论 #32698406 未加载
llIIllIIllIIl超过 2 年前
php.ini<p>Seriously, that is usually the easiest configuration i had to deal with. Although there are hundreds of configurable options, each one is thoroughly documented in the same file.<p>Yaml config, although being better structured, rarely have any comments with explanation, and I’m still waiting to see one documented at 30% of php.ini.
评论 #32699957 未加载
citrin_ru超过 2 年前
Nginx config documentation is one of the best I&#x27;ve seen. Things I like which are not common: 1. It specifies in which version a feature was introduced (if it was not present if first public release) 2. It is easy to send a link pointing to description of a specific directive e. g. <a href="http:&#x2F;&#x2F;nginx.org&#x2F;r&#x2F;env" rel="nofollow">http:&#x2F;&#x2F;nginx.org&#x2F;r&#x2F;env</a> 3. For each directive docs tell a default value. It seems obvious that any decent documentation should have this but I&#x27;ve seen software for which it is hard to find out default values so you have to add into config many values just in case even if they are not different from defaults.
minhmeoke超过 2 年前
The Dhall config language has a very persuasive landing page (<a href="https:&#x2F;&#x2F;dhall-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dhall-lang.org&#x2F;</a>), nice docs (<a href="https:&#x2F;&#x2F;docs.dhall-lang.org&#x2F;tutorials&#x2F;Getting-started_Generate-JSON-or-YAML.html" rel="nofollow">https:&#x2F;&#x2F;docs.dhall-lang.org&#x2F;tutorials&#x2F;Getting-started_Genera...</a>), and also a great philosophy of preventing errors through correct design: <a href="https:&#x2F;&#x2F;docs.dhall-lang.org&#x2F;discussions&#x2F;Safety-guarantees.html" rel="nofollow">https:&#x2F;&#x2F;docs.dhall-lang.org&#x2F;discussions&#x2F;Safety-guarantees.ht...</a>
tomcam超过 2 年前
Would you mind reaching out to the email address in my profile? I have some strong feelings about it and fancy myself a decent docs person. A couple of public things I&#x27;ve done are at <a href="https:&#x2F;&#x2F;tomcam.github.io&#x2F;postgres&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tomcam.github.io&#x2F;postgres&#x2F;</a>, <a href="https:&#x2F;&#x2F;vuepressbook.com" rel="nofollow">https:&#x2F;&#x2F;vuepressbook.com</a>, and <a href="https:&#x2F;&#x2F;tomcam.github.io&#x2F;least-github-pages&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tomcam.github.io&#x2F;least-github-pages&#x2F;</a>. I have just begun using goreleaser a few days ago so I have a good perspective.
joshxyz超过 2 年前
eslint config is great, you can use json or js or other formats, works well.
dylanhassinger超过 2 年前
i like .js config files, easy to add comments
yuppie_scum超过 2 年前
Just yaml please, or JSON.