diff options
author | 2024-10-11 22:39:31 +0800 | |
---|---|---|
committer | 2024-10-11 22:39:31 +0800 | |
commit | fd367b5341037ea5026b859e995a66d32f78498b (patch) | |
tree | ea3b8912332b1e8299ba4a8435fb5577a7491abe /examples/non-html-pages/src | |
parent | 58e22bd042f9a67c2167605bc7ee45538f1b4921 (diff) | |
download | astro-fd367b5341037ea5026b859e995a66d32f78498b.tar.gz astro-fd367b5341037ea5026b859e995a66d32f78498b.tar.zst astro-fd367b5341037ea5026b859e995a66d32f78498b.zip |
Remove some examples (#12196)
Diffstat (limited to 'examples/non-html-pages/src')
-rw-r--r-- | examples/non-html-pages/src/env.d.ts | 1 | ||||
-rw-r--r-- | examples/non-html-pages/src/pages/about.json.ts | 11 | ||||
-rw-r--r-- | examples/non-html-pages/src/pages/index.astro | 22 |
3 files changed, 0 insertions, 34 deletions
diff --git a/examples/non-html-pages/src/env.d.ts b/examples/non-html-pages/src/env.d.ts deleted file mode 100644 index e16c13c69..000000000 --- a/examples/non-html-pages/src/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// <reference path="../.astro/types.d.ts" /> diff --git a/examples/non-html-pages/src/pages/about.json.ts b/examples/non-html-pages/src/pages/about.json.ts deleted file mode 100644 index 8fa365724..000000000 --- a/examples/non-html-pages/src/pages/about.json.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Returns the file body for this non-HTML file. -// The content type is based off of the extension in the filename, -// in this case: about.json. -export async function GET() { - return new Response( - JSON.stringify({ - name: 'Astro', - url: 'https://astro.build/', - }) - ); -} diff --git a/examples/non-html-pages/src/pages/index.astro b/examples/non-html-pages/src/pages/index.astro deleted file mode 100644 index 921400acd..000000000 --- a/examples/non-html-pages/src/pages/index.astro +++ /dev/null @@ -1,22 +0,0 @@ -<html lang="en"> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width" /> - <meta name="generator" content={Astro.generator} /> - <title>Astro</title> - </head> - <body> - <h1 id="result">Loading...</h1> - <script> - // Non-HTML files will be included in your final build, so you - // can fetch them directly in the browser. - const response = await fetch(`/about.json`); - const data = await response.json(); - const resultHeader = document.getElementById('result'); - - if (resultHeader) { - resultHeader.innerHTML = `Load complete!<br/>Built with: <a href="${data.url}">${data.name}!</a>`; - } - </script> - </body> -</html> |