qmk_firmware
qmk_firmware copied to clipboard
Develop some sort of include system for keycode documentation
Feature Request Type
- [ ] Core Functionality
- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.)
- [ ] Alteration (enhancement/optimization) of existing Feature(s)
- [x] New behavior
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.
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:
- A file with modifier keycodes: keycodes_modifiers.md
- A file with keycodes_modifiers.md embedded in it: keycodes.md (full list of keys)
- Another file with keycodes_modifiers.md embedded in it: feature_advanced_keycodes.md (modifier keys)
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.
I think this is a step in the right direction. Could you please open the PR? Feel free to ping me on it.
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?
Is there a reason the linked PR stalled? Is this issue looking for a new approach?