-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs Guidelines/How To #74
Comments
possessive/undetermined formulations? What "tone" should we use?(don't pay too much attention to the title of the message... translation troubles I have...)
=> what option should we use?
I personnaly prefer 3. Because when I see possessive forms, I always associate that with advertising... :o (personnal bias, I guess...) |
It depends, but I'd avoid "our trainer" in this case. It's obvious that it's Codewars' so it's unnecessary. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
to add: #19 (comment) |
This comment has been minimized.
This comment has been minimized.
to add: #280 |
todo: prune these guidelines from what has become useless since the migration to Docusaurus and build a see #286 |
Centralization of sets of rules to follow or informations when writting docs.
Table of contents:
Technical matters:
Content matters:
Troubleshooting:
General organization / update or create new documents
Generic procedure to follow
For creating new documents:
Headers hierarchy
The default hierarachy MUST be precisely followed, because it's used as a base to atuomatically build the ToC.
# Page Title
: must be unique in the document. This is name of the page## Section Title
### Subsection Title
Note: you cannot make "jumps" in the heirarchy, like forgetting
##
on purpose and go straight to###
. This will cause rendering errors.Sidebar and automatic "table of contents" (ToC)
See for example this page: https://docs.codewars.com/getting-started/registering/
The sidebar on the left is created in the gridsome.config.js document, a the root level.
The Table of Content (ToC) is automatically created when the page is rendered according to the headers used in the document. Hence this implies some constraints on those headers/titles:
Frontmatter for markdown pages
How to define it
To put at the beginning of the pages, so that the documents are associated with the related "'stuff" (fields are optional):
Warnings:
kind:tutorial
doesn't work, butkind: tutaorial
does)perv/next
have to be rendered path, not file paths (see links section)Choosing the right kind of labels for the documentation
See #8 (ext. documentation: https://documentation.divio.com/).
Links to other parts of the documentation
External links: just like usual:
[text](https://...)
For links to terms of the glossary, use the following syntax:
[text](/glossary/#id)
, where theid
is either the slugifiedterm
itself (lowercased string, replacing whitespaces with hyphens) or theid
filed if manually defined (code file: glossary ; related issue: Complete the glossary (an ongoing comprehensive (?) list) #23 ).For other internal links to the docs, use the path of the rendered page (not to be confused with the file path!).
For example, if the Markdown file is at
content/foo/bar.md
, its (rendered) path is/foo/bar/
.Exceptions are
index.md
files: they are treated likeindex.html
socontent/foo/index.md
is at/foo/
.file:
docs/content/references/markdown/extensions.md
link;
[check the Codewars Mardown extensions](/references/markdown/extensions/)
file:
docs/content/references/markdown/index.md
link;
[check the Mardown reference page](/references/markdown/)
Alternative syntax using "references", for internal or external links:
It's possible to define
references
so that the complete path of the link doesn't decrease the readability of the text:link:
[check the Codewars Mardown extensions][mark-ref]
reference:
[mark-ref][/references/markdown/extensions/]
put preferably all the references at the end of the file (see example here)
If you need to put comments in the file, not visible in the rendered page
Use regular html comments:
Way of writing
#74 (comment): Inspiration can be taken from Google's developer documentation style guide.
Some points to kee in mind:
Orthograph / choices of words
Codewars
, not "CodeWars"Kata
,Kyū
,Dan
,Kumite
(Kata/Katas: defining the plural to use in the docs #63)user(s)
Screenshots: both light & dark versions
See #71, #85
Pictures can be stored in a subdirectory if needed. Preferably called
img
if used.Related code:
Remark-container to support callouts
See #164
Documentation: See https://gridsome.org/plugins/gridsome-plugin-remark-container
Syntax
Examples of info boxes (that's how they look at the moment of writing, but they can be modified, extended, or styling can be changed), with in order:
tip
,note
,details
,important
,warning
,danger
Troubles with the linter/rendering engine
Problems with correct wording considered incorrect by the linter
(related: #7)
If you need to temporarily deactivate the linter (ex: "the data is built in suach a way..." raises an error asking to change for
built-in
), use this:or
Usual mistakes to check when the rendering doesn't work
If you get everything in red in the pull request, here are some things to check:
Details
on the result of the linter check to see if some words or expressions are considered invalid (see above)If the linter is ok but not the other checks, verify that
#
as title###
, you must have#
and##
somewhere beforeIf all checks are green and the ToC or the sidebar aren't showing up:
The text was updated successfully, but these errors were encountered: