From 7f25e4395d8d2391baa07665b9a3184aa60a9e43 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Wed, 17 Sep 2025 07:06:28 +0200 Subject: [PATCH 1/5] docs: fix markdown docs --- docs/latest/examples/markdown.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/docs/latest/examples/markdown.md b/docs/latest/examples/markdown.md index ba7d18e928c..d49750eff65 100644 --- a/docs/latest/examples/markdown.md +++ b/docs/latest/examples/markdown.md @@ -11,10 +11,10 @@ browser. First, let's install the [`@deno/gfm`](https://jsr.io/@deno/gfm) package that can transform markdown to html. -1. Run `deno install jsr:@deno/gfm` -2. Create a markdown file like `content.md`: +1. Run `deno install --allow-scripts jsr:@deno/gfm` +2. Create a markdown file like `content/example.md`: -```md path/to/content.md +```md content/example.md ## some heading and some interesting text here @@ -24,32 +24,29 @@ and some interesting text here 4. Add a route that renders that file -```tsx main.ts +```tsx route/markdown.tsx +// deno-lint-ignore-file react-no-danger +import { define } from "../utils.ts"; import { CSS, render as renderMarkdown } from "@deno/gfm"; -const CONTENT = `## some heading - -and some interesting text here - -> oh look a blockquote -`; - -const app = new App(); - -app.get("/", async (ctx) => { - const content = await Deno.readTextFile("path/to/content.md"); +export default define.page(async () => { + const content = await Deno.readTextFile("./content/example.md"); const html = renderMarkdown(content); - return await ctx.render( + return (

Here comes a markdown post: