Home Comments Thread
New Thread

Style Keyboard Keys and Shortcuts on Web Pages | /en/2023/02/key-buttons/

giscus giscus 2023-02-25 15:11:19

Style Keyboard Keys and Shortcuts on Web Pages

When writing keyboard shortcuts on web pages, we often use the <code> tag in HTML, or equivalently, a pair of backticks in Markdown. As a result, these keys are styled as code. I have been …

https://yihui.org/en/2023/02/key-buttons/

👍 1❤️ 1

1 Comment

njtierney njtierney 2023-11-27 00:15:48

Thanks for this, Yihui - do you have a recommended place to put

<script src="https://cdn.jsdelivr.net/npm/@xiee/utils/js/key-buttons.min.js" defer></script>
<link href="https://cdn.jsdelivr.net/npm/@xiee/utils/css/key-buttons.min.css" rel="stylesheet">

In a hugo blog?

yihui yihui 2023-11-27 00:53:44

Yes, you can put it in any template file that is used for all pages, e.g., https://github.com/rbind/njtierney.com/blob/master/layouts/partials/head_custom.html

Sign in to join the discussion

Sign in with GitHub