www: new fenced code block design (#1629)

This commit is contained in:
Marvin Hagemeister
2023-08-13 10:52:41 +02:00
committed by GitHub
parent 7679e278cc
commit 6a599dbed5
43 changed files with 363 additions and 342 deletions
+3 -4
View File
@@ -14,8 +14,7 @@ The following file uses
[dynamic routing](https://fresh.deno.dev/docs/getting-started/dynamic-routes) to
handle the three cases. It's assumed this file is called `[slug].tsx`:
```ts
// routes/[slug].tsx
```ts routes/[slug].tsx
import { Handlers, PageProps } from "$fresh/server.ts";
import { extract } from "$std/front_matter/yaml.ts";
import { CSS, render } from "$gfm";
@@ -31,7 +30,7 @@ export const handler: Handlers<Page> = {
let rawMarkdown = "";
if (ctx.params.slug === "remote") {
const resp = await fetch(
`https://raw.githubusercontent.com/denoland/fresh/main/docs/introduction/index.md`,
`https://raw.githubusercontent.com/denoland/fresh/main/docs/introduction/index.md`
);
if (resp.status !== 200) {
return ctx.render(undefined);
@@ -81,7 +80,7 @@ export default function MarkdownPage({ data }: PageProps<Page | null>) {
The contents of the `text.md` file are the following:
```md
```md text.md
---
description: testFromText
---