codewars / docs

The Codewars Docs :construction: WIP
https://docs.codewars.com
MIT License
56 stars 194 forks source link

Docs Guidelines/How To #74

Open Blind4Basics opened 4 years ago

Blind4Basics commented 4 years ago

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:

  1. go to Code
  2. create a new branch
  3. edit the files, create new ones, add folders, ... all that you need
  4. once you're done, go to pull request and create a new one with your new branch
  5. wait (maybe a lot... x) ) for the checks to be done, update if necessary, then wait for feedback of reviewers.
  6. __don't forget to update the topics issue, or tags and kinds files to keep track of the things__
  7. if you put links to non existing pages yet, create a new issue (labelled ToDo) listing all the links to update later (lines, and related page)

Headers hierarchy

The default hierarachy MUST be precisely followed, because it's used as a base to atuomatically build the ToC.

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/



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):

---
description: ""
kind: reference
topic: markdown
sidebar: docs
prev: /docs/writing-content/
next: /docs/settings/
tags:
  - docc
  - deploy
  - short
---

Warnings:

Choosing the right kind of labels for the documentation

See #8 (ext. documentation: https://documentation.divio.com/).


Links to other parts of the documentation


If you need to put comments in the file, not visible in the rendered page

Use regular html comments:

<!---sqrtgstg--->


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


Screenshots: both light & dark versions

See #71, #85

Pictures can be stored in a subdirectory if needed. Preferably called img if used. Related code:

<ThemedImage
  alt="Follow Button"
  sources={{
    light: require("./img/follow_light.png").default,
    dark: require("./img/follow_dark.png").default,
  }}
/>


Remark-container to support callouts

See #164

image

Documentation: See https://gridsome.org/plugins/gridsome-plugin-remark-container

Syntax

:::keyword optional_title
some content
:::

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

image



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:


<!--- textlint-disable -->

...(your problematic paragraph here)

<!-- textlint-enable -->

or

<!--- For false positive "built in" -->
<!--- textlint-disable terminology -->

...

<!--- textlint-enable terminology -->

Usual mistakes to check when the rendering doesn't work

Blind4Basics commented 4 years ago

possessive/undetermined formulations? What "tone" should we use?

(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?

  1. whatever we want?
  2. possessive form
  3. undetermined/passive form

I personnaly prefer 3. Because when I see possessive forms, I always associate that with advertising... :o (personnal bias, I guess...)

kazk commented 4 years ago

It depends, but I'd avoid "our trainer" in this case. It's obvious that it's Codewars' so it's unnecessary.

kazk commented 4 years ago

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

Blind4Basics commented 4 years ago

todo:

Blind4Basics commented 3 years ago

to add: https://github.com/codewars/docs/issues/19#issuecomment-720920787

hobovsky commented 3 years ago

Examples of info boxes:

In order: tip, note, details, important, warning, danger

image

That's how they look at the moment of writing, but they can be modified, extended, or styling can be changed.

Blind4Basics commented 3 years ago

to add: https://github.com/codewars/docs/pull/280

Blind4Basics commented 3 years ago

todo: prune these guidelines from what has become useless since the migration to Docusaurus and build a meta/docs-guidelines.md

see #286