Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

fardjad/deno-asciidoctor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno-asciidoctor

Patched version of Asciidoctor.js to be used with Deno

Description

This repository automatically patches the browser bundle from @asciidoctor/core to make it compatible with Deno and creates a tag matching the version of the npm module.

For more information about the module, please visit the Asciidoctor.js repository.

Usage

import Asciidoctor from 'https://deno.land/x/asciidoctor/mod.js';

const asciidoctor = Asciidoctor();
const html = asciidoctor.convert(
  [
    ":linkcss:",
    ":stylesheet: https://cdn.jsdelivr.net/gh/asciidoctor/asciidoctor/data/stylesheets/asciidoctor-default.css",
    "== TestTitle",
  ].join("\n"),
  {
    safe: "server",
    doctype: "book",
    standalone: true,
  },
) as string;
console.log(html);

Limitations

Fetching remote resources such as stylesheets is not supported! To load stylesheets, consider setting the linkcss document attribute or embed the stylesheets in the HTML manually.

About

Patched version of Asciidoctor.js to be used with Deno

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages