Skip to content
Jason Hughes edited this page Mar 8, 2023 · 2 revisions

deno-markdown is a simple markdown generator that's goal is to help make markdown files quickly and easily.

Setup

  • Install Deno
  • Create a new Typescript file called main.ts
  • Add the following block of code to the top
import { Markdown } from "https://deno.land/x/deno_markdown/mod.ts";
  • This will import the module from deno.land
  • New up the Markdown class
let markdown = new Markdown();
  • Create your markdown content
markdown
  .header("My Header", 1);
  • You can now either write the file out or console log the content
markdown
  .header("My Header", 1)
  .write("./folder/", "fileName");

console.log(markdown.content);

Full code:

import { Markdown } from "https://deno.land/x/deno_markdown/mod.ts";

markdown
  .header("My Header", 1)
  .write("./folder/", "fileName");

console.log(markdown.content);

Now you have created a basic example please take a look at some of the more advanced examples in the wiki

Clone this wiki locally