Back to Qmk Firmware

Documentation Capabilities

docs/__capabilities.md

4.06.4 KB
Original Source

Documentation Capabilities

This page lays out the capabilities used by the QMK Firmware documentation, in order to aid future transitions to other page generators. Focuses mainly on things other than normal Markdown, as it's assumed that markdown generators should still function accordingly.

Overall capabilities

Unrelated to styling, high-level tech.

  • Title anchors -- :id=some-anchor-name, used for direct linking to sections
  • Specifying CNAME for root domain -- docs.qmk.fm
  • Moved pages, see index.html
  • Text search
  • Footnotes [like this][1]
<!-- Comments should not show up --> <!-- Nor should multiline comments with newlines show up -->

Dividing lines


<hr> <hr/>

Images

Lists

Newlines with :

Line one

Line two

Line three

Nested dotted:

  • The PR is complete and ready to merge
  • GitHub checks for the PR are green whenever possible
    • A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
      • Modifications to existing files should not need to add license headers to pass lint, for instance.
      • If it's not directly related to your PR's functionality, prefer avoiding making a change.

Nested dashed:

  • The PR is complete and ready to merge
  • GitHub checks for the PR are green whenever possible
    • A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
      • Modifications to existing files should not need to add license headers to pass lint, for instance.
      • If it's not directly related to your PR's functionality, prefer avoiding making a change.

Nested numbered:

  1. The PR is complete and ready to merge
  2. GitHub checks for the PR are green whenever possible
    1. A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
      1. Modifications to existing files should not need to add license headers to pass lint, for instance.
      2. If it's not directly related to your PR's functionality, prefer avoiding making a change.

Nested mixed:

  1. Add it to the schema in data/schemas/keyboards.jsonschema
  2. Add a mapping in data/maps
  3. (optional and discouraged) Add code to extract/generate it to:
  • lib/python/qmk/info.py
  • lib/python/qmk/cli/generate/config_h.py
  • lib/python/qmk/cli/generate/rules_mk.py

Emoji {#emoji}

Direct:

πŸ‘πŸŽ‰ First off, thanks for taking the time to read this and contribute! πŸŽ‰πŸ‘

As colon-name-colon:

:heavy_check_mark: : works and was tested

:o: : does not apply

:x: : not supported by MCU

XML Entities

clueboard ← This is the organization folder, there's no rules.mk file

1–4

Command+<code>`</code>

Styling

CSS-ish

<b style="font-size:150%">This is 150% of normal sizing, and bold!</b>

Tables

Column AColumn B
LeftRight

Indented sections

Indent without any sort of marker

?> Query, this?

!> Notification, damnit!

::: info This is an info box. :::

::: tip This is a tip. :::

::: warning This is a warning. :::

::: danger This is a dangerous warning. :::

::: details This is a details block. :::

Keyboard keys

<kbd>,</kbd>

<kbd>Right Alt</kbd>+<kbd>Right Shift</kbd>

  1. Click <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd>

  2. Click <kbd><kbd>File</kbd> > <kbd>Preferences ></kbd> > <kbd>Settings</kbd> </kbd>

  3. Hit Ctrl-<code>`</code> (Grave) to bring up the terminal or go to <kbd><kbd>View</kbd> > <kbd>Terminal</kbd></kbd> (command workbench.action.terminal.toggleTerminal). A new terminal will be opened if there isnβ€˜t one already.

    This should start the terminal in the workspace's folder (so the qmk_firmware folder), and then you can compile your keyboard.

Code Blocks

Inline code with tag: <code>test</code>

Inline code with backticks: test

This is preformatted
Indented by 4 spaces
The letters lined up
c
int c_code(void) {
    return -1;
}
makefile
ifeq ($(BUILD),)
     CHUNDER_REQUIRED = yes
endif
python
from pathlib import Path

p = Path('/path/to/qmk_firmware')
json
{
    "a": "b",
    "c": 4,
    "d": {
        "e": [
            0, 1, 2, 3
        ]
    }
}
diff
 #undef RGBLIGHT_LED_COUNT
+#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
+#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
 #define RGBLIGHT_LED_COUNT 12
 #define RGBLIGHT_HUE_STEP 8
 #define RGBLIGHT_SAT_STEP 8

Indented code as part of a list:

Sub/Superscript

<sub>This is subscripted, apparently.</sub>

<sup>This is superscripted, apparently.</sup>

I<sup>2</sup>C

T<sub>0H</sub>, T<sub>0L</sub>

Tabs

Tabs are based on section headers, with ** enclosing the tab title.

<!-- tabs:start -->

** Tab one **

Content one

<!-- tabs:start -->
** Nested one **

Nested content one

** Nested two **

Nested content two

<!-- tabs:end -->

** Tab two **

Content two

** Tab three **

Content three

<!-- tabs:end -->

::::tabs === tab a a content 2 === tab b b content 2 === tab c

nested a content 2

::::

Details sections

Expandable:

<details> <summary>Some summary text that shows up before expanding</summary>

!> Embedded notification!

This is some inner content.

</details>

Embed

example embed

<!--@include: ./__capabilities_inc.md-->