-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: recommend deno add command (#123)
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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! | ||
|
@@ -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"; | ||
|
@@ -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 }); | ||
|