Skip to content

Commit

Permalink
change by-example name to examples (denoland#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisjofrank authored Aug 13, 2024
1 parent 0f6b253 commit aa20d00
Show file tree
Hide file tree
Showing 73 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The actual content of the docs site is found mostly in these folders:
- `runtime` - docs for the Deno CLI / runtime
- `deploy` - docs for the Deno Deploy cloud service
- `subhosting` - docs for Deno Subhosting
- `by-example` - docs for the [Examples](#Examples) section
- `examples` - docs for the [Examples](#Examples) section

Most files are [markdown](https://lume.land/plugins/markdown/), but even
markdown files are processed with [MDX](https://mdxjs.com/), which enables you
Expand Down Expand Up @@ -123,7 +123,7 @@ snippets showcasing various functions of the APIs implemented in Deno.

### Adding an example

To add an example, create a file in the `by-example` directory. The file name
To add an example, create a file in the `examples` directory. The file name
should be a short description of the example (in kebab case) and the contents
should be the code for the example. The file should be in the `.ts` format. The
file should start with a JSDoc style multi line comment that describes the
Expand Down
4 changes: 2 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ site.copy("deno.json");
site.copy("go.json");
site.copy("server.ts");
site.copy("middleware.ts");
site.copy("by-example");
site.copy("examples");

site.use(redirects({
output: "json",
Expand Down Expand Up @@ -214,7 +214,7 @@ site.ignore(
"README.md",
(path) => path.match(/\/reference_gen.*.ts/) !== null,
(path) => path.includes("/reference_gen/node_modules"),
"by-example",
"examples",
// "deploy",
// "examples.page.tsx",
// "runtime",
Expand Down
6 changes: 3 additions & 3 deletions examples.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const sidebar = [
];

export default function* (_data: Lume.Data, helpers: Lume.Helpers) {
const files = [...walkSync("./by-example/", {
const files = [...walkSync("./examples/", {
exts: [".ts"],
})];
const examples = files.map((file) => {
Expand All @@ -54,10 +54,10 @@ export default function* (_data: Lume.Data, helpers: Lume.Helpers) {
).join("\n");

const url =
`https://github.com/denoland/deno-docs/blob/main/by-example/${example.name}${
`https://github.com/denoland/deno-docs/blob/main/examples/${example.name}${
example.parsed.files.length > 1 ? "/main" : ""
}`;
const rawUrl = `https://docs.deno.com/by-example/${example.name}${
const rawUrl = `https://docs.deno.com/examples/${example.name}${
example.parsed.files.length > 1 ? "/main" : ""
}`;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion orama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export async function generateDocumentsForSymbols(): Promise<OramaDocument[]> {
}

export async function generateDocumentsForExamples(): Promise<OramaDocument[]> {
const files = [...walkSync("./by-example/", {
const files = [...walkSync("./examples/", {
exts: [".ts"],
})];
return await Promise.all(files.map(async (file) => {
Expand Down
2 changes: 1 addition & 1 deletion runtime/manual/runtime/builtin_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ to the file system.
Refer to the links below for code examples of how to use the file system
functions.

- [Reading files in several different ways](https://examples.deno.land/reading-files)
- [Reading files in several different ways](https://docs.deno.com/examples/reading-files)
- [Reading files in streams](../../tutorials/file_server.md)
- [Reading a text file (`Deno.readTextFile`)](../../tutorials/read_write_files.md#reading-a-text-file)
- [Writing a text file (`Deno.writeTextFile`)](../../tutorials/read_write_files.md#writing-a-text-file)
Expand Down
6 changes: 3 additions & 3 deletions runtime/manual/tools/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ title: "`deno run`, run a file"
## Usage

To run the file at
[https://examples.deno.land/hello-world.ts](https://examples.deno.land/hello-world.ts)
[https://docs.deno.com/examples/hello-world.ts](https://docs.deno.com/examples/hello-world.ts)
use:

```console
deno run https://examples.deno.land/hello-world.ts
deno run https://docs.deno.com/examples/hello-world.ts
```

You can also run files locally. Ensure that you are in the correct directory and
Expand Down Expand Up @@ -76,7 +76,7 @@ command.
You can pipe code from stdin and run it immediately with:

```console
curl https://examples.deno.land/hello-world.ts | deno run -
curl https://docs.deno.com/examples/hello-world.ts | deno run -
```

## Terminate run
Expand Down
2 changes: 1 addition & 1 deletion runtime/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ runtime.
- [Vue](./how_to_with_npm/vue.md)

Additional examples can by found at
[Deno by Example](https://examples.deno.land/).
[Deno by Example](https://docs.deno.com/examples/).

0 comments on commit aa20d00

Please sign in to comment.