Skip to content

Commit d9166e0

Browse files
committed
docs(demos): enable HTML demos
1 parent 967ff98 commit d9166e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/extensions/mrdocs-demos.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ module.exports = function (registry) {
143143
}
144144
}
145145

146-
// Remove HTML and Rendered Asciidoc from the list of formats
147-
// - The HTML generator is unmaintained
146+
// Remove Rendered Asciidoc from the list of formats
148147
// - The raw Asciidoc is already rendered by the mrdocs.com server as HTML
149-
versionFormats = versionFormats.filter(format => format !== 'html' && format !== 'adoc-asciidoc');
148+
versionFormats = versionFormats.filter(format => format !== 'adoc-asciidoc');
150149
let multipageFormats = versionFormats.filter(format => format !== 'xml');
151150

152151
let versionFormatColumns = versionFormats.map(format => `*${humanizeFormat(format)}*`).join(' | ');
@@ -185,10 +184,11 @@ module.exports = function (registry) {
185184
}
186185
return '';
187186
})()
188-
if (['adoc', 'xml'].includes(format)) {
187+
if (['adoc', 'xml', 'html'].includes(format)) {
189188
const adoc_icon = 'https://avatars.githubusercontent.com/u/3137042?s=200&v=4'
189+
const html_icon = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/refs/heads/6.x/svgs/brands/html5.svg'
190190
const code_file_icon = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/file-code.svg'
191-
const icon = format === 'adoc' ? adoc_icon : code_file_icon
191+
const icon = format === 'adoc' ? adoc_icon : format === 'html' ? html_icon : code_file_icon
192192
text += `| image:${icon}[${humanizeLibrary(library)} reference in ${humanizeFormat(format)} format,width=16,height=16,link=${demoUrlWithSuffix},window=_blank]`
193193
} else {
194194
text += `| ${demoUrlWithSuffix}[🔗,window=_blank]`

0 commit comments

Comments
 (0)