Skip to content

Commit

Permalink
Exampleurls (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisjofrank authored Aug 12, 2024
1 parent d0e6974 commit 9860bb9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ site.copy("deno.json");
site.copy("go.json");
site.copy("server.ts");
site.copy("middleware.ts");
site.copy("by-example");

site.use(redirects({
output: "json",
Expand Down
1 change: 0 additions & 1 deletion by-example/dependency-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* @difficulty beginner
* @tags cli, deploy
* @resource {/examples/import-export} Example: Importing & Exporting
* @run <url>
* @group Basics
*
* It is unwieldy to have to import the same remote module over and over again.
Expand Down
1 change: 0 additions & 1 deletion by-example/import-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @title Importing & Exporting
* @difficulty beginner
* @tags cli, deploy
* @run <url>
* @resource {/examples/dependency-management} Example: Dependency Management
* @resource {https://docs.deno.com/runtime/manual/basics/modules} Manual: Modules
* @group Basics
Expand Down
9 changes: 4 additions & 5 deletions examples.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ export default function* (_data: Lume.Data, helpers: Lume.Helpers) {
`https://github.com/denoland/deno-docs/blob/main/by-example/${example.name}${
example.parsed.files.length > 1 ? "/main" : ""
}`;
const rawUrl =
`https://raw.githubusercontent.com/denoland/deno-docs/main/by-example/${example.name}${
example.parsed.files.length > 1 ? "/main" : ""
}`;
const rawUrl = `https://docs.deno.com/by-example/${example.name}${
example.parsed.files.length > 1 ? "/main" : ""
}`;

yield {
url: `/examples/${example.label}/index.html`,
Expand Down Expand Up @@ -322,7 +321,7 @@ function SnippetComponent(props: {
<div class="-mx-4 h-full sm:mx-0 overflow-scroll sm:overflow-hidden relative gfm-highlight rounded-md">
{props.snippet.code && (
<div class="nocopy h-full markdown-body !bg-[var(--color-canvas-subtle)]">
<pre class="highlight language-ts"><code dangerouslySetInnerHTML={{__html: props.snippet.code}}></code></pre>
<pre class="highlight language-ts"><code dangerouslySetInnerHTML={{ __html: props.snippet.code }}></code></pre>
</div>
)}
</div>
Expand Down

0 comments on commit 9860bb9

Please sign in to comment.