Skip to content

Commit

Permalink
docs: recommend deno add command (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Jun 28, 2024
1 parent a67486f commit a7a63b2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ CSS, syntax highlighting, and HTML sanitization.

## Usage

First install the package with the command:

```sh
deno add @deno/gfm
```

```js
import { CSS, render } from "jsr:@deno/gfm";
import { CSS, render } from "@deno/gfm";

const markdown = `
# Hello, world!
Expand Down Expand Up @@ -83,7 +89,7 @@ By default syntax highlighting for JavaScript, Markdown, and HTML is included.
You can include more languages importing them:

```js
import { CSS, render } from "jsr:@deno/gfm";
import { CSS, render } from "@deno/gfm";

// Add support for TypeScript, Bash, and Rust.
import "npm:[email protected]/components/prism-typescript.js";
Expand All @@ -100,7 +106,7 @@ By default, all rendering is in blocks. There are cases where one would like to
render some inline markdown, and this is achievable using the `inline` setting:

```ts
import { render } from "jsr:@deno/gfm";
import { render } from "@deno/gfm";

const markdown = "My [Deno](https://deno.land) Blog";
const header = render(markdown, { inline: true });
Expand Down

0 comments on commit a7a63b2

Please sign in to comment.