qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.09k stars 38.89k forks source link

Develop some sort of include system for keycode documentation #4610

Open jetpacktuxedo opened 5 years ago

jetpacktuxedo commented 5 years ago

Feature Request Type

Description

As discussed in discord, it would be really nice to have some sort of system for generating https://docs.qmk.fm/#/keycodes and all of the keycodes on the Features pages from a single source. This would help prevent those pages from falling out of sync with one another and make it easier to update with new keycodes.

jakevandervaate commented 2 years ago

Docsify has an embed feature that allows embedding contents of files into other files.

Example:

Creating a file called "keycodes_modifiers.md", and placing the table with the modifier keycodes in it, would allow for that file to be embedded into the Full List of keys page and the Modifier Keys page.

Reference "keycodes_modifiers.md" in any other file with

[keycodes_modifiers.md](./keycodes_modifiers.md ':include')

This would provide a single source for any given set of keycodes, and would prevent different pages from having different lists of keycodes (like the two pages I linked above).

I've tested this on my branch with the files listed below:

This builds and displays correctly on my system when I run qmk docs and view the local version.

I'd be happy to apply this change to the rest of the keycode types, and submit a PR, if this is good solution for this issue.

Erovia commented 2 years ago

I think this is a step in the right direction. Could you please open the PR? Feel free to ping me on it.

Anika-Roy commented 1 year ago

Hi! Im participating in Hacktoberfest and I'd like to know if this issue is counted in Hacktoberfest and if I can work on it?

3geek14 commented 1 year ago

Is there a reason the linked PR stalled? Is this issue looking for a new approach?