Begin style guide: Document conventions #633
Conversation
@@ -0,0 +1,30 @@ | |||
# Headings in CoreOS Documentation | |||
`# Headings in CoreOS Documentation` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure what to make of this at first. Maybe we have an example that uses the headings in the doc as an example and it looks something like:
For example, this document's headings are structured in code as:
# Headings in CoreOS Documentation
## Documentation Format
### Subheadings
#### Subheadings and the Sidebar Outline
### Example: *The "Average" Document*
Should we go ahead and make the whole styleguide one document, ie As much as I hate to suggest this, maybe do all caps like the rest, ie |
We can always break it apart later if needed |
The site deployment process inspects a document's headings to derive the thumb-index outlines seen in the right sidebar of documentation viewed at [CoreOS.com](https://coreos.com/docs/). | ||
|
||
### Example: *The "Average" Document* | ||
`### Example: "The Average Document"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inconsistent with the preceding line
Perhaps not in this PR but would love to address the wrapping issue raised in rkt/rkt#1648. Generally speaking, we've tried to stick to a "one sentence per line" policy in markdown documentation because it makes it much easier to review diffs on GitHub. |
@jonboulle I break this rule all over the place, so we should try to figure out a rule around that. |
dragging in @philips ... |
@robszumski Re: file names/directory anticipation: I'm so much in the undecided column that I started on two previous drafts with the file name I had thought about some more-developed later version living in a file named |
@jonboulle So the source for markdown would look like:
Renders as: Markdown line breaksThis is a sample document showing the proposed one-sentence-per-line formatting convention. This third sentence begins a second paragraph. Second headingThis sentence is short. This sentence is lonely. Other renderers ignore the single-LF and join lines so separated into paragraphs, but the github renderer seems to obey rather than ignore them. |
I'm confused. We do this successfully elsewhere. Let me look when in front
|
I think the github md interpreter gives different output here in a comments chain vs on displaying a source file, e.g., coreos/docs/README.md. That file when experimentally adjusted toward one-sentence-per-file-line displays as expected, with single LF usually just consumed and ignored. See joshix@81debe7 One-sentence-per-line:Pro:
Con:
|
1c1f9ee
to
18b73ed
Compare
I'm still in favour of optimising for diff reviews, and am not really concerned about the tediousness of writing it. |
I don't really like the idea of imposing this restriction on all teams just because |
5f1956f
to
0f47628
Compare
@joshix care to make an executive decision on this one? |
Sure. Let me hang the exit sign on the bikeshed door:
I intend to write as much into the CONTRIBUTING guide and update this PR, unless anyone thinks I should be set on fire instead. Cf. https://github.com/google/styleguide/blob/gh-pages/docguide/style.md#character-line-limit |
I don't follow, source of truth for what? |
Just about whether or not something can or cannot be line-wrapped. |
SGTM, probably best to get an ack from @philips as AIUI he's the initiator On Wed, Nov 18, 2015 at 1:14 PM, Josh Wood notifications@github.com wrote:
|
I still like one sentence per line and it works in nearly all editors. The 80 char rule gets you into doc churn hell because everyone's editor is going to do something different whether that be wrapping to 79, wrapping words with dashes, etc. |
@philips Since we don't agree, let me spell out my reasoning and you can make the ruling. I thought about the points you raise, but I came down to two points: 1) as @crawford alludes, part of the intent of Markdown is plain-text readability. The source document is supposed to be a fair rough representation of the document as rendered. We write the kind of docs with markdown that one would expect to read in a terminal. The one sentence-per-line rule makes this pretty terrible. Nothing looks like a paragraph. I presumed (not knowing the history) that markdown was chosen for these conventional reasons and therefore those goals were worth preserving. Having thought it out that way, I compared with some style guides for large repos using Markdown. Google's rules pretty much encapsulate what I was aiming for. Maybe that's confirmation bias. https://github.com/google/styleguide/blob/gh-pages/docguide/style.md#character-line-limit In order, I would happily concede on the proposed 80-chars per line. I truly think the intent of markdown is writing natural english paragraphs, and I kind of hate I would be forced to concede, but like it much less, if we had to adopt one-sentence-per-line all over. |
Note: spec unordered list style ( |
1305624
to
ef2a25f
Compare
I should clarify that my preference is not strictly sentence-per-line, but rather just avoiding line length limits. I'm +1 on the proposed paragraph-per-line. |
ef2a25f
to
16153d8
Compare
YAML files: Set style for this. Before deciding, note that upstream k8s tends to say |
@robszumski @meghanschofield @philips I think we could land this as a delightful holiday gift for one and all. Would enjoy your parting thoughts on same. |
|
||
### Naming | ||
|
||
Name hyperlinks carefully to give them maximum context. For example, note that certain information is in the [style guide](STYLE.md), rather than just pointing lazily to the style guide [here](STYLE.md). The link text "here" gives almost no information about its target. It is helpful to [write a clear sentence](https://faculty.washington.edu/heagerty/Courses/b572/public/StrunkWhite.pdf) first, then bracket the choice words within to declare them a hyperlink. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes yes yes. I hate saying "these are available here"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shakes fist
Added a few comments, but overall looks good. |
|
||
## Translations | ||
1. Fork this repository into your git workspace and/or github account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub
5eca91f
to
1baac31
Compare
CoreOS conventions of English style, markdown text formatting, and the like.
9eeca0d
to
a56579b
Compare
Begin style guide: Document conventions
Add astyle/
directory.Add STYLE.md guide to conventions and standards. Beginning with headings.
Addresses https://github.com/coreos-inc/coreos-pages/issues/324