From ad8ec0fa424e9c58d09c8d137cce91f88a096863 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:10:48 +0200 Subject: [PATCH] docs: fix markdown docs (#3459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk Co-authored-by: Claude Opus 4.6 (1M context) --- docs/latest/examples/markdown.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/latest/examples/markdown.md b/docs/latest/examples/markdown.md index ad889b11..f7598f49 100644 --- a/docs/latest/examples/markdown.md +++ b/docs/latest/examples/markdown.md @@ -12,9 +12,9 @@ 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`: +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,25 +24,30 @@ and some interesting text here 3. Add a route that renders that file -```tsx main.ts +```tsx routes/markdown.tsx +import { define } from "@/utils.ts"; import { CSS, render as renderMarkdown } from "@deno/gfm"; -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:

+ {/* deno-lint-ignore react-no-danger */}