{"id":18518086,"url":"https://github.com/cyotek/markdig.keyboard","last_synced_at":"2025-04-22T21:23:03.933Z","repository":{"id":144116097,"uuid":"316666199","full_name":"cyotek/Markdig.Keyboard","owner":"cyotek","description":"Markdig extension for inserting kbd tags","archived":false,"fork":false,"pushed_at":"2021-06-01T17:26:46.000Z","size":109,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T19:01:05.484Z","etag":null,"topics":["csharp","markdig"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyotek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-28T05:46:29.000Z","updated_at":"2025-03-25T08:48:33.000Z","dependencies_parsed_at":"2023-07-06T19:01:55.482Z","dependency_job_id":null,"html_url":"https://github.com/cyotek/Markdig.Keyboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyotek%2FMarkdig.Keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyotek%2FMarkdig.Keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyotek%2FMarkdig.Keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyotek%2FMarkdig.Keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyotek","download_url":"https://codeload.github.com/cyotek/Markdig.Keyboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250325510,"owners_count":21412094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","markdig"],"created_at":"2024-11-06T17:11:34.206Z","updated_at":"2025-04-22T21:23:03.892Z","avatar_url":"https://github.com/cyotek.png","language":"C#","funding_links":["https://paypal.me/cyotek"],"categories":[],"sub_categories":[],"readme":"# Markdig.Keyboard.Extension\n\n[![NuGet][nugetbadge]][nuget]\n[![Donate][paypalbadge]][paypal]\n\n![A basic demonstration showing the output][1]\n\nThe **Markdig.Keyboard** library is an extension for use with\nthe [Markdig][2] processing library and allows easier insertion\nof `kbd` elements without having to resort to raw HTML.\n\n## Getting the library\n\nThe easiest way of obtaining the library is via [NuGet][nuget].\n\n\u003e `Install-Package Cyotek.Markdig.Keyboard`\n\n## Using the library\n\nWhen you build your Markdig pipeline, call `UseKeyboard()`. Any\ntext wrapped in double angled brackets will be converted to\n`kbd` tags.\n\n```csharp\n_markdownPipeline = new MarkdownPipelineBuilder()\n  .UseAdvancedExtensions()\n  .UseKeyboard()\n  .Build();\n```\n\n## Options\n\nThere is also a `KeyboardOptions` class you can use to control\nthe output. Currently it allows you either to assign a CSS class\nto generated elements via the `ClassName` property, or specify a\ndifferent HTML tag via the `TagName` property.\n\n```csharp\n_markdownPipeline = new MarkdownPipelineBuilder()\n  .UseAdvancedExtensions()\n  .UseKeyboard(new KeyboardOptions\n  {\n    ClassName = \"my-class\",\n    TagName = \"code\"\n  })\n  .Build();\n```\n\n## Examples\n\nThis first example uses default options, which output `kbd` tags\nwith no further processing.\n\n```csharp\nvar markdownPipeline = new MarkdownPipelineBuilder()\n  .UseAdvancedExtensions()\n  .UseKeyboard()\n  .Build();\n\nvar output = Markdown.ToHtml(@\"### File Menu\n\n| Description | Shortcut Keys |\n| ----------- | ------------- |\n| New         | \u003c\u003cCtrl+N\u003e\u003e    |\n| Open        | \u003c\u003cCtrl+O\u003e\u003e    |\n| Save        | \u003c\u003cCtrl+S\u003e\u003e    |\n| Save As     |               |\n| Export      |               |\n| Exit        | \u003c\u003cAlt+F4\u003e\u003e    |\n\", markdownPipeline);\n```\n\n```html\n\u003ch3 id=\"file-menu\"\u003eFile Menu\u003c/h3\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eShortcut Keys\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eNew\u003c/td\u003e\n      \u003ctd\u003e\u003ckbd\u003eCtrl+N\u003c/kbd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eOpen\u003c/td\u003e\n      \u003ctd\u003e\u003ckbd\u003eCtrl+O\u003c/kbd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eSave\u003c/td\u003e\n      \u003ctd\u003e\u003ckbd\u003eCtrl+S\u003c/kbd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eSave As\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eExport\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eExit\u003c/td\u003e\n      \u003ctd\u003e\u003ckbd\u003eAlt+F4\u003c/kbd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n```\n\nThis second example uses custom options to change the output tag\nto `code` and apply a custom class.\n\n```csharp\nvar markdownPipeline = new MarkdownPipelineBuilder()\n  .UseAdvancedExtensions()\n  .UseKeyboard(new KeyboardOptions\n  {\n    ClassName = \"keyboard\",\n    TagName = \"code\"\n  })\n  .Build();\n\nvar output = Markdown.ToHtml(\"Press \u003c\u003cAlt+F4\u003e\u003e to exit.\", markdownPipeline);\n```\n\n```html\n\u003cp\u003ePress \u003ccode class=\"keyboard\"\u003eAlt+F4\u003c/code\u003e to exit.\u003c/p\u003e\n```\n\n## Requirements\n\n.NET Framework 3.5 or later.\n\nPre-built binaries are available via a signed [NuGet package][nuget]\ncontaining the following targets.\n\n* .NET 4.8\n* .NET 4.7.2\n* .NET 4.6.2\n* .NET 4.6\n* .NET Standard 2.0\n* .NET Standard 2.1\n* .NET Core 2.1\n* .NET Core 3.1\n* .NET 5.0\n\nIs there a target not on this list you'd like to see? Raise an\n[issue][ghissue], or even better, a [pull request][ghpull].\n\n## Acknowledgements\n\nInterim package icon derived from the [Tango Icon Library][3].\n\n## License\n\nThis source is licensed under the MIT license. See `LICENSE.txt`\nfor the full text.\n\n[nugetbadge]: https://img.shields.io/nuget/v/Cyotek.Markdig.Keyboard.svg\n[nuget]: https://www.nuget.org/packages/Cyotek.Markdig.Keyboard/\n[paypalbadge]: https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif\n[paypal]: https://paypal.me/cyotek\n[ghissue]: https://github.com/cyotek/Markdig.Keyboard/issues\n[ghpull]: https://github.com/cyotek/Markdig.Keyboard/pulls\n[ghrel]: https://github.com/cyotek/Markdig.Keyboard/releases\n[gh]: https://github.com/cyotek/Markdig.Keyboard\n\n[1]: res/screenshot.png\n[2]: https://github.com/lunet-io/markdig/\n[3]: https://www.iconfinder.com/icons/118804/map_character_accessories_icon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyotek%2Fmarkdig.keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyotek%2Fmarkdig.keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyotek%2Fmarkdig.keyboard/lists"}