Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exampleurls #703

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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