Open Blind4Basics opened 4 years ago
(don't pay too much attention to the title of the message... translation troubles I have...)
The easiest way of getting started is to use our trainer on the dashboard to pick your next kata.
The easiest way of getting started is to use the trainer on the dashboard to pick your next kata.
=> 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.
We should follow some existing guidelines for general writing style.
I like Google's developer documentation style guide.
When you're documenting tasks that involve the user interface (UI), focus on the task, not how the user interacts with the UI element. https://developers.google.com/style/ui-elements
todo:
Examples of info boxes:
In order: tip
, note
, details
, important
, warning
, danger
That's how they look at the moment of writing, but they can be modified, extended, or styling can be changed.
todo: prune these guidelines from what has become useless since the migration to Docusaurus and build a meta/docs-guidelines.md
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: #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 areindex.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
https://github.com/codewars/docs/issues/74#issuecomment-661583133: 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
(#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: