{"_id":"@coolshaurya/asciidoctor-html5s","name":"@coolshaurya/asciidoctor-html5s","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"@coolshaurya/asciidoctor-html5s","version":"0.6.0","description":"Semantic HTML5 backend (converter) for Asciidoctor","author":{"name":"Jakub Jirutka","email":"jakub@jirutka.cz"},"license":"MIT","homepage":"https://github.com/jirutka/asciidoctor-html5s","bugs":{"url":"https://github.com/jirutka/asciidoctor-html5s/issues"},"repository":{"type":"git","url":"git+https://github.com/jirutka/asciidoctor-html5s.git"},"keywords":["asciidoc","asciidoctor","template","backend","html5","opal"],"main":"dist/asciidoctor-html5s.js","scripts":{"prepublishOnly":"bundle install && bundle exec rake build:js && bundle exec rake readme2md"},"devDependencies":{"@asciidoctor/core":">=3.0.0 <4.0.0"},"peerDependencies":{"@asciidoctor/core":">=3.0.0 <4.0.0"},"_id":"@coolshaurya/asciidoctor-html5s@0.6.0","gitHead":"84d5ab3605691e0d29c9b324b074788677361279","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-TQ6JtuQDS3W4p0hpv6SMw5/ve1t9fU8bknkZMt/iBewoxPww6QwbISOk1j7+flr3i2T+7Lte9dwHZA7iIr6Kkg==","shasum":"1e902f55cc3c130b7d1123c1af82dbc07ff50f44","tarball":"https://registry.npmjs.org/@coolshaurya/asciidoctor-html5s/-/asciidoctor-html5s-0.6.0.tgz","fileCount":5,"unpackedSize":200449,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQChGNYgzqTqLzATOvGBYObKwkgRSqm/OH2Xsj300aXwsAIhALRk2h9K+ylaGDZ39ZI4RDzTlAPBTPL75HgvUUJKP0Tm"}]},"_npmUser":{"name":"coolshaurya","email":"me@shauryashubham.com"},"directories":{},"maintainers":[{"name":"coolshaurya","email":"me@shauryashubham.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/asciidoctor-html5s_0.6.0_1776032106887_0.6541618976042993"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T22:15:06.762Z","0.6.0":"2026-04-12T22:15:07.028Z","modified":"2026-04-12T22:15:07.332Z"},"maintainers":[{"name":"coolshaurya","email":"me@shauryashubham.com"}],"description":"Semantic HTML5 backend (converter) for Asciidoctor","homepage":"https://github.com/jirutka/asciidoctor-html5s","keywords":["asciidoc","asciidoctor","template","backend","html5","opal"],"repository":{"type":"git","url":"git+https://github.com/jirutka/asciidoctor-html5s.git"},"author":{"name":"Jakub Jirutka","email":"jakub@jirutka.cz"},"bugs":{"url":"https://github.com/jirutka/asciidoctor-html5s/issues"},"license":"MIT","readme":"This project provides alternative HTML5 converter (backend) for\n[Asciidoctor](http://asciidoctor.org/) that focuses on correct\nsemantics, accessibility and compatibility with common typographic CSS\nstyles.\n\n## Goals\n\n- Clean markup with correct HTML5 semantics.\n\n- Good accessibility for people with disabilities.\n\n- Compatibility with common typographic CSS styles when possible and\n  especially with GitHub and GitLab.\n\n- Full standalone converter without fallback to the built-in Asciidoctor\n  converters.\n\n- Easy to use and integrate into third-party projects.\n\n- Well readable and maintainable code – this should be never sacrificed\n  for performance (I’m looking at you, Asciidoctor!).\n\n## Non-goals\n\n- Compatibility with existing Asciidoctor CSS styles.\n\n## Text Substitutions\n\n### Quotes\n\nAsciidoctor provides syntax for so-called [“curved quotation\nmarks”](https://asciidoctor.org/docs/user-manual/#curved) (which are\nactually just the *correct* quotation marks), but the built-in\nconverters outputs only one (hard-coded) type of the single/double\nquotation marks — that one used in English and few other languages. This\nconverter outputs the correct type of the quotation marks based on the\nspecified language (using standard `lang` attribute).\n\n<table>\n<colgroup>\n<col style=\"width: 25%\" />\n<col style=\"width: 12%\" />\n<col style=\"width: 37%\" />\n<col style=\"width: 12%\" />\n<col style=\"width: 12%\" />\n</colgroup>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Name</th>\n<th style=\"text-align: center;\">Syntax</th>\n<th style=\"text-align: left;\">Languages (:lang:)</th>\n<th style=\"text-align: center;\">HTML</th>\n<th style=\"text-align: center;\">Rendered</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><p>double quotes</p></td>\n<td style=\"text-align: center;\"><pre><code> &quot;`word`&quot;</code></pre></td>\n<td style=\"text-align: left;\"><p>af, en, eo, ga, hi, ia, id, ko, mt, th,\ntr, zh</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201c;word&amp;#x201d;</code></pre></td>\n<td style=\"text-align: center;\"><p>“word”</p></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>bs, fi, sv</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201d;word&amp;#x201d;</code></pre></td>\n<td style=\"text-align: left;\"><p>”word”</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>cs, da, de, is, lt, sl, sk, sr</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201e;word&amp;#x201c;</code></pre></td>\n<td style=\"text-align: left;\"><p>„word“</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>hu, pl, nl, ro</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201e;word&amp;#x201d;</code></pre></td>\n<td style=\"text-align: left;\"><p>„word”</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>single quotes</p></td>\n<td style=\"text-align: center;\"><pre><code> &#39;`word`&#39;</code></pre></td>\n<td style=\"text-align: left;\"><p>af, en, eo, ga, hi, ia, id, ko, mt, th,\ntr, zh</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x2018;word&amp;#x2019;</code></pre></td>\n<td style=\"text-align: center;\"><p>‘word’</p></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>bs, fi, sv</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x2019;word&amp;#x2019;</code></pre></td>\n<td style=\"text-align: left;\"><p>’word’</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>cs, da, de, is, lt, sl, sk, sr</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201a;word&amp;#x2018;</code></pre></td>\n<td style=\"text-align: left;\"><p>‚word‘</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>nl</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x201a;word&amp;#x2019;</code></pre></td>\n<td style=\"text-align: left;\"><p>‚word’</p></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>hu, pl, ro</p></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#x00ab;word&amp;#x00bb;</code></pre></td>\n<td style=\"text-align: left;\"><p>«word»</p></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n\nThe default (fallback) type is the first one.\n\n### Replacements\n\nAsciidoctor replaces `--` with em dash (—) and does not provide any\nreplacement for en dash (–). That’s not very convenient, because en dash\nis more common than em dash; at least in (British) English and Czech\n(actually we don’t use em dash at all). So this extension also modifies\nthe [replacements\ntable](https://asciidoctor.org/docs/user-manual/#replacements): changes\n`--` to en dash and adds `---` for em dash.\n\n<table>\n<colgroup>\n<col style=\"width: 28%\" />\n<col style=\"width: 14%\" />\n<col style=\"width: 14%\" />\n<col style=\"width: 14%\" />\n<col style=\"width: 28%\" />\n</colgroup>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Name</th>\n<th style=\"text-align: center;\">Syntax</th>\n<th style=\"text-align: center;\">Unicode</th>\n<th style=\"text-align: center;\">Rendered</th>\n<th style=\"text-align: left;\">Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><p>En dash</p></td>\n<td style=\"text-align: center;\"><pre><code> --</code></pre></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#8211;</code></pre></td>\n<td style=\"text-align: center;\"><p>–</p></td>\n<td style=\"text-align: left;\"><p>Only replaced if between two word\ncharacters, between a word character and a line boundary, or flanked by\nspaces.</p>\n<p>When flanked by space characters (e.g. <code>a -- b</code> or\n<code>a --- b</code>), the normal spaces are replaced by thin spaces\n(&amp;#8201;).</p></td>\n</tr>\n<tr>\n<td style=\"text-align: left;\"><p>Em dash</p></td>\n<td style=\"text-align: center;\"><pre><code> ---</code></pre></td>\n<td style=\"text-align: center;\"><pre><code> &amp;#8212;</code></pre></td>\n<td style=\"text-align: center;\"><p>—</p></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n\n## Other Enhancements\n\n### Image Block\n\nThe `link` attribute recognizes few special values:\n\nlink=self  \nMake the image a link with URL of the image itself – to open it in full\nsize.\n\nlink=none / link=false  \nSuppress the effect of `:html5s-image-default-link: self`, i.e. remove\nthe default image link.\n\nBoth block image and inline image supports additional attribute\n`loading` (see [Lazy\nloading](https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading#Images)\non MDN for more information).\n\n### Additional Inline Formatting Roles\n\ndel  \n`[del]#deleted text#` is rendered as `<del>deleted text</del>`.\n\nins  \n`[ins]#inserted text#` is rendered as `<ins>inserted text</ins>`.\n\nstrike  \n`[strike]#inserted text#` is rendered as `<s>inserted text</s>`. This is\nan alias for `line-through`.\n\n## Requirements\n\nNote: This converter consists of\n[Slim](https://github.com/slim-template/slim/) templates, but they are\nprecompiled into pure Ruby code using\n[asciidoctor-templates-compiler](https://github.com/jirutka/asciidoctor-templates-compiler/),\nso you don’t need Slim to use it!\n\n- [Node.js](https://nodejs.org/)\n\n- [@asciidoctor/core](https://www.npmjs.com/package/@asciidoctor/core)\n  \\>=3.0.0 \\<4.0.0\n\n## Installation\n\nInstall asciidoctor-html5s from npmjs.com:\n\n``` sh\nnpm install --save asciidoctor-html5s\n```\n\n## Usage\n\n``` js\n// Load asciidoctor.js and asciidoctor-html5s.\nconst asciidoctor = require('@asciidoctor/core')()\nconst asciidoctorHtml5s = require('asciidoctor-html5s')\n\n// Register the HTML5s converter and supporting extension.\nasciidoctorHtml5s.register()\n\n// Convert the content to HTML using html5s converter.\nconst content = \"Hello, *world!*!\"\nconst html = asciidoctor.convert(content, { backend: 'html5s' })\nconsole.log(html)\n```\n\n### Attributes\n\nExtra attributes accepted by the asciidoctor-html5s:\n\nhtml5s-force-stem-type  \nIgnore declared (e.g. `:stem: asciimath`, `asciimath:[]`, …​) and default\ntype of the stem macro/block and always use the one specified by this\nattribute.  \nAsciidoctor hard-codes the default stem type to “asciimath”, which is\nnot supported by KaTeX.\n\nhtml5s-image-default-link: self  \nMake every block image a link with the image’s source URL (i.e. user can\nclick on the image to open it in full size), unless the link attribute\nis defined and is not `none` or `false`.\n\nhtml5s-image-self-link-label  \nThe link title and ARIA label for the block image link that points to\nthe image file (i.e. `href` equals the image’s `src`). Default is\n`Open the image in full size`.\n\n## License\n\nThis project is licensed under [MIT\nLicense](http://opensource.org/licenses/MIT/). For the full text of the\nlicense, see the [LICENSE](LICENSE) file.\n","readmeFilename":"README.md","_rev":"1-357ea486b63c959d394412c871c1167c"}