Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: shortcut markup for <kbd> elements #24

Open
nekomeowww opened this issue Nov 26, 2023 · 2 comments
Open

feature request: shortcut markup for <kbd> elements #24

nekomeowww opened this issue Nov 26, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nekomeowww
Copy link
Member

Currently the experience of writing <kbd> elements and nested <kbd> elements for keystrokes when documenting key bindings are causing headaches.

Can we introduce some of the currently using markup for <kbd> and port them into markdown-it by looking up the rehype, remark and micromark communities?

@nekomeowww nekomeowww added the enhancement New feature or request label Nov 26, 2023
@Ampernic
Copy link
Contributor

Ampernic commented Apr 5, 2024

This would be great, since when trying to use markdown-it-kbd and bi-directional-links at the same time - the latter starts cluttering the log with attempts to parse kbd as bi-directional syntax.

@nekomeowww
Copy link
Member Author

Note

In Nolebase, I directly use <kbd data-macos-keyboard-key="command">command</kbd> + <kbd data-keyboard-key="space">space</kbd> markup along with the CSS styles I manually tweaked for VitePress to make it possible to attach icons and logos for the keys.

These are the known markups I know for sure to look into:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants