diff --git a/examples/README.md b/examples/README.md
index e3e295b6d71c..50caa7f1801b 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,6 +1,5 @@
# Astro Examples Library
-
The easiest way to check out one of these examples on your machine is by running this command in an empty directory:
```
diff --git a/examples/basics/src/components/Card.astro b/examples/basics/src/components/Card.astro
index 4039d4f4f84a..aea28c83f88e 100644
--- a/examples/basics/src/components/Card.astro
+++ b/examples/basics/src/components/Card.astro
@@ -4,7 +4,8 @@ export interface Props {
body: string;
href: string;
}
-const { href, title, body } = Astro.props;
+
+const { href, title, body } = Astro.props as Props;
---
@@ -69,6 +70,7 @@ const { href, title, body } = Astro.props;
}
.link-card:is(:hover, :focus-within) h2 span {
+ will-change: transform;
transform: translateX(2px);
}
diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro
index cf05f0bb6111..1ca6b285c0ae 100644
--- a/examples/basics/src/pages/index.astro
+++ b/examples/basics/src/pages/index.astro
@@ -86,6 +86,7 @@ import Card from "../components/Card.astro";
border-radius: 4px;
padding: 0.15em 0.25em;
}
+
.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
diff --git a/examples/blog-multiple-authors/.gitignore b/examples/blog-multiple-authors/.gitignore
deleted file mode 100644
index 02f6e50b494c..000000000000
--- a/examples/blog-multiple-authors/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-# build output
-dist/
-
-# dependencies
-node_modules/
-
-# logs
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-
-
-# environment variables
-.env
-.env.production
-
-# macOS-specific files
-.DS_Store
diff --git a/examples/blog-multiple-authors/.npmrc b/examples/blog-multiple-authors/.npmrc
deleted file mode 100644
index ef83021af3ec..000000000000
--- a/examples/blog-multiple-authors/.npmrc
+++ /dev/null
@@ -1,2 +0,0 @@
-# Expose Astro dependencies for `pnpm` users
-shamefully-hoist=true
diff --git a/examples/blog-multiple-authors/.stackblitzrc b/examples/blog-multiple-authors/.stackblitzrc
deleted file mode 100644
index 43798ecff844..000000000000
--- a/examples/blog-multiple-authors/.stackblitzrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "startCommand": "npm start",
- "env": {
- "ENABLE_CJS_IMPORTS": true
- }
-}
\ No newline at end of file
diff --git a/examples/blog-multiple-authors/README.md b/examples/blog-multiple-authors/README.md
deleted file mode 100644
index 6078a0bc896f..000000000000
--- a/examples/blog-multiple-authors/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Astro Starter Kit: Blog with Multiple Authors
-
-```
-npm init astro -- --template blog-multiple-authors
-```
-
-[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog-multiple-authors)
-
-> π§βπ **Seasoned astronaut?** Delete this file. Have fun!
-
-Features:
-
-- β SEO-friendly setup with canonical URLs and OpenGraph data
-- β Full Markdown support
-- β RSS 2.0 generation
-- β Sitemap.xml generation
-
-## π Project Structure
-
-Inside of your Astro project, you'll see the following folders and files:
-
-```
-/
-βββ public/
-β βββ robots.txt
-β βββ favicon.ico
-βββ src/
-β βββ components/
-β β βββ Tour.astro
-β βββ pages/
-β βββ index.astro
-βββ package.json
-```
-
-Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
-
-There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
-
-Any static assets, like images, can be placed in the `public/` directory.
-
-## π§ Commands
-
-All commands are run from the root of the project, from a terminal:
-
-| Command | Action |
-|:---------------- |:-------------------------------------------- |
-| `npm install` | Installs dependencies |
-| `npm run dev` | Starts local dev server at `localhost:3000` |
-| `npm run build` | Build your production site to `./dist/` |
-| `npm run preview` | Preview your build locally, before deploying |
-
-## π Want to learn more?
-
-Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
diff --git a/examples/blog-multiple-authors/astro.config.mjs b/examples/blog-multiple-authors/astro.config.mjs
deleted file mode 100644
index 44cff71d3f96..000000000000
--- a/examples/blog-multiple-authors/astro.config.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-import { defineConfig } from 'astro/config';
-import preact from '@astrojs/preact';
-
-// https://astro.build/config
-export default defineConfig({
- // Enable the Preact integration to support Preact JSX components.
- integrations: [preact()],
- site: `http://astro.build`,
-});
diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json
deleted file mode 100644
index a2dc398b455c..000000000000
--- a/examples/blog-multiple-authors/package.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "@example/blog-multiple-authors",
- "version": "0.0.1",
- "private": true,
- "scripts": {
- "dev": "astro dev",
- "start": "astro dev",
- "build": "astro build",
- "preview": "astro preview"
- },
- "devDependencies": {
- "@astrojs/preact": "^0.5.2",
- "astro": "^1.0.0-rc.6",
- "sass": "^1.52.2"
- },
- "dependencies": {
- "preact": "^10.7.3"
- }
-}
diff --git a/examples/blog-multiple-authors/public/favicon.ico b/examples/blog-multiple-authors/public/favicon.ico
deleted file mode 100644
index 578ad458b890..000000000000
Binary files a/examples/blog-multiple-authors/public/favicon.ico and /dev/null differ
diff --git a/examples/blog-multiple-authors/public/images/chapter-01.jpg b/examples/blog-multiple-authors/public/images/chapter-01.jpg
deleted file mode 100644
index a848d3059480..000000000000
Binary files a/examples/blog-multiple-authors/public/images/chapter-01.jpg and /dev/null differ
diff --git a/examples/blog-multiple-authors/public/images/chapter-02.jpg b/examples/blog-multiple-authors/public/images/chapter-02.jpg
deleted file mode 100644
index 0a18c689d9ee..000000000000
Binary files a/examples/blog-multiple-authors/public/images/chapter-02.jpg and /dev/null differ
diff --git a/examples/blog-multiple-authors/public/images/chapter-03.jpg b/examples/blog-multiple-authors/public/images/chapter-03.jpg
deleted file mode 100644
index e3b6823cee7a..000000000000
Binary files a/examples/blog-multiple-authors/public/images/chapter-03.jpg and /dev/null differ
diff --git a/examples/blog-multiple-authors/public/images/don.jpg b/examples/blog-multiple-authors/public/images/don.jpg
deleted file mode 100644
index 4419679de527..000000000000
Binary files a/examples/blog-multiple-authors/public/images/don.jpg and /dev/null differ
diff --git a/examples/blog-multiple-authors/public/images/sancho.jpg b/examples/blog-multiple-authors/public/images/sancho.jpg
deleted file mode 100644
index 2c2b0c6bdf64..000000000000
Binary files a/examples/blog-multiple-authors/public/images/sancho.jpg and /dev/null differ
diff --git a/examples/blog-multiple-authors/sandbox.config.json b/examples/blog-multiple-authors/sandbox.config.json
deleted file mode 100644
index 9178af77d7de..000000000000
--- a/examples/blog-multiple-authors/sandbox.config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "infiniteLoopProtection": true,
- "hardReloadOnChange": false,
- "view": "browser",
- "template": "node",
- "container": {
- "port": 3000,
- "startScript": "start",
- "node": "14"
- }
-}
diff --git a/examples/blog-multiple-authors/src/components/MainHead.astro b/examples/blog-multiple-authors/src/components/MainHead.astro
deleted file mode 100644
index be3584519b78..000000000000
--- a/examples/blog-multiple-authors/src/components/MainHead.astro
+++ /dev/null
@@ -1,49 +0,0 @@
----
-import "../styles/global.css";
-
-export interface Props {
- title: string;
- description: string;
- image?: string;
- type?: string;
- next?: string;
- prev?: string;
- canonicalURL?: string | URL;
-}
-
-const { title, description, image, type, next, prev, canonicalURL } = Astro.props as Props;
----
-
-
-
-{title}
-
-
-
-
-
-
-
-
-
-
-
-
-
-{next && }
-{prev && }
-
-
-
-
-{image && }
-
-
-
-
-
-
-{image && }
diff --git a/examples/blog-multiple-authors/src/components/Nav.astro b/examples/blog-multiple-authors/src/components/Nav.astro
deleted file mode 100644
index a2a5fc3a37b6..000000000000
--- a/examples/blog-multiple-authors/src/components/Nav.astro
+++ /dev/null
@@ -1,63 +0,0 @@
----
-export interface Props {
- title: string;
-}
-const { title } = Astro.props;
----
-
-
-
-
diff --git a/examples/blog-multiple-authors/src/components/Pagination.astro b/examples/blog-multiple-authors/src/components/Pagination.astro
deleted file mode 100644
index f31f00776a2e..000000000000
--- a/examples/blog-multiple-authors/src/components/Pagination.astro
+++ /dev/null
@@ -1,44 +0,0 @@
----
-export interface Props {
- prevUrl: string;
- nextUrl: string;
-}
-
-const { prevUrl, nextUrl } = Astro.props;
----
-
-
-
-
-
diff --git a/examples/blog-multiple-authors/src/pages/authors/[author].astro b/examples/blog-multiple-authors/src/pages/authors/[author].astro
deleted file mode 100644
index 368fdd5919f2..000000000000
--- a/examples/blog-multiple-authors/src/pages/authors/[author].astro
+++ /dev/null
@@ -1,80 +0,0 @@
----
-import MainHead from "../../components/MainHead.astro";
-import Nav from "../../components/Nav.astro";
-import PostPreview from "../../components/PostPreview.astro";
-import authorData from "../../data/authors.json";
-
-export async function getStaticPaths() {
- const allPosts = await Astro.glob("../post/*.md");
- let allAuthorsUnique = [...new Set(allPosts.map((p) => p.frontmatter.author))];
- return allAuthorsUnique.map((author) => ({ params: { author }, props: { allPosts } }));
-}
-
-const { allPosts } = Astro.props;
-const title = "Donβs Blog";
-const description = "An example blog on Astro";
-const canonicalURL = new URL(Astro.url.pathname, Astro.site);
-
-/** filter posts by author, sort by date */
-const posts = allPosts
- .filter((post) => post.frontmatter.author === Astro.params.author)
- .sort((a, b) => new Date(b.frontmatter.date).valueOf() - new Date(a.frontmatter.date).valueOf());
-const author = authorData[posts[0].frontmatter.author];
----
-
-
-
- {title}
-
-
-
-
-
-
-
-
-
-
-
- {author.name}
-
- {posts.map((post) => )}
-
-
-
diff --git a/examples/blog-multiple-authors/src/pages/index.astro b/examples/blog-multiple-authors/src/pages/index.astro
deleted file mode 100644
index 8e47b8f15e0d..000000000000
--- a/examples/blog-multiple-authors/src/pages/index.astro
+++ /dev/null
@@ -1,45 +0,0 @@
----
-// Component Imports
-import MainHead from "../components/MainHead.astro";
-import Nav from "../components/Nav.astro";
-import PostPreview from "../components/PostPreview.astro";
-import Pagination from "../components/Pagination.astro";
-import authorData from "../data/authors.json";
-
-// Component Script:
-// You can write any JavaScript/TypeScript that you'd like here.
-// It will run during the build, but never in the browser.
-// All variables are available to use in the HTML template below.
-let title = "Donβs Blog";
-let description = "An example blog on Astro";
-const canonicalURL = new URL(Astro.url.pathname, Astro.site);
-
-// Data Fetching: List all Markdown posts in the repo.
-let allPosts = await Astro.glob("./post/*.md");
-allPosts.sort(
- (a, b) => new Date(b.frontmatter.date).valueOf() - new Date(a.frontmatter.date).valueOf()
-);
-let firstPage = allPosts.slice(0, 2);
-// Full Astro Component Syntax:
-// https://docs.astro.build/core-concepts/astro-components/
----
-
-
-
-
-
-
-
-
-
-
- {allPosts.map((post) => (
-
- ))}
-
-
-
-
-
diff --git a/examples/blog-multiple-authors/src/pages/post/chapter-i.md b/examples/blog-multiple-authors/src/pages/post/chapter-i.md
deleted file mode 100644
index 9a6fa14ead3a..000000000000
--- a/examples/blog-multiple-authors/src/pages/post/chapter-i.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-layout: ../../layouts/post.astro
-title: Chapter I
-tag: movie
-date: 2021-05-17
-image: /images/chapter-01.jpg
-author: don
-description: Which Treats of the Character and Pursuits of the Famous Gentleman Don Quixote of La Mancha
----
-
-In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing. An olla of rather more beef than mutton, a salad on most nights, scraps on Saturdays, lentils on Fridays, and a pigeon or so extra on Sundays, made away with three-quarters of his income. The rest of it went in a doublet of fine cloth and velvet breeches and shoes to match for holidays, while on week-days he made a brave figure in his best homespun. He had in his house a housekeeper past forty, a niece under twenty, and a lad for the field and market-place, who used to saddle the hack as well as handle the bill-hook. The age of this gentleman of ours was bordering on fifty; he was of a hardy habit, spare, gaunt-featured, a very early riser and a great sportsman. They will have it his surname was Quixada or Quesada (for here there is some difference of opinion among the authors who write on the subject), although from reasonable conjectures it seems plain that he was called Quexana. This, however, is of but little importance to our tale; it will be enough not to stray a hairβs breadth from the truth in the telling of it.
-
-You must know, then, that the above-named gentleman whenever he was at leisure (which was mostly all the year round) gave himself up to reading books of chivalry with such ardour and avidity that he almost entirely neglected the pursuit of his field-sports, and even the management of his property; and to such a pitch did his eagerness and infatuation go that he sold many an acre of tillageland to buy books of chivalry to read, and brought home as many of them as he could get. But of all there were none he liked so well as those of the famous Feliciano de Silvaβs composition, for their lucidity of style and complicated conceits were as pearls in his sight, particularly when in his reading he came upon courtships and cartels, where he often found passages like βthe reason of the unreason with which my reason is afflicted so weakens my reason that with reason I murmur at your beauty;β or again, βthe high heavens, that of your divinity divinely fortify you with the stars, render you deserving of the desert your greatness deserves.β Over conceits of this sort the poor gentleman lost his wits, and used to lie awake striving to understand them and worm the meaning out of them; what Aristotle himself could not have made out or extracted had he come to life again for that special purpose. He was not at all easy about the wounds which Don Belianis gave and took, because it seemed to him that, great as were the surgeons who had cured him, he must have had his face and body covered all over with seams and scars. He commended, however, the authorβs way of ending his book with the promise of that interminable adventure, and many a time was he tempted to take up his pen and finish it properly as is there proposed, which no doubt he would have done, and made a successful piece of work of it too, had not greater and more absorbing thoughts prevented him.
diff --git a/examples/blog-multiple-authors/src/pages/post/chapter-ii.md b/examples/blog-multiple-authors/src/pages/post/chapter-ii.md
deleted file mode 100644
index eda406b42072..000000000000
--- a/examples/blog-multiple-authors/src/pages/post/chapter-ii.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-layout: ../../layouts/post.astro
-title: Chapter II
-tag: movie
-date: 2021-05-18
-image: /images/chapter-02.jpg
-author: sancho
-description: Which Treats of the First Sally the Ingenious Don Quixote Made From Home
----
-
-These preliminaries settled, he did not care to put off any longer the execution of his design, urged on to it by the thought of all the world was losing by his delay, seeing what wrongs he intended to right, grievances to redress, injustices to repair, abuses to remove, and duties to discharge. So, without giving notice of his intention to anyone, and without anybody seeing him, one morning before the dawning of the day (which was one of the hottest of the month of July) he donned his suit of armour, mounted Rocinante with his patched-up helmet on, braced his buckler, took his lance, and by the back door of the yard sallied forth upon the plain in the highest contentment and satisfaction at seeing with what ease he had made a beginning with his grand purpose. But scarcely did he find himself upon the open plain, when a terrible thought struck him, one all but enough to make him abandon the enterprise at the very outset. It occurred to him that he had not been dubbed a knight, and that according to the law of chivalry he neither could nor ought to bear arms against any knight; and that even if he had been, still he ought, as a novice knight, to wear white armour, without a device upon the shield until by his prowess he had earned one. These reflections made him waver in his purpose, but his craze being stronger than any reasoning, he made up his mind to have himself dubbed a knight by the first one he came across, following the example of others in the same case, as he had read in the books that brought him to this pass. As for white armour, he resolved, on the first opportunity, to scour his until it was whiter than an ermine; and so comforting himself he pursued his way, taking that which his horse chose, for in this he believed lay the essence of adventures.
-
-Thus setting out, our new-fledged adventurer paced along, talking to himself and saying, βWho knows but that in time to come, when the veracious history of my famous deeds is made known, the sage who writes it, when he has to set forth my first sally in the early morning, will do it after this fashion? βScarce had the rubicund Apollo spread oβer the face of the broad spacious earth the golden threads of his bright hair, scarce had the little birds of painted plumage attuned their notes to hail with dulcet and mellifluous harmony the coming of the rosy Dawn, that, deserting the soft couch of her jealous spouse, was appearing to mortals at the gates and balconies of the Manchegan horizon, when the renowned knight Don Quixote of La Mancha, quitting the lazy down, mounted his celebrated steed Rocinante and began to traverse the ancient and famous Campo de Montiel;ββ which in fact he was actually traversing. βHappy the age, happy the time,β he continued, βin which shall be made known my deeds of fame, worthy to be moulded in brass, carved in marble, limned in pictures, for a memorial for ever. And thou, O sage magician, whoever thou art, to whom it shall fall to be the chronicler of this wondrous history, forget not, I entreat thee, my good Rocinante, the constant companion of my ways and wanderings.β Presently he broke out again, as if he were love-stricken in earnest, βO Princess Dulcinea, lady of this captive heart, a grievous wrong hast thou done me to drive me forth with scorn, and with inexorable obduracy banish me from the presence of thy beauty. O lady, deign to hold in remembrance this heart, thy vassal, that thus in anguish pines for love of thee.β
-
-So he went on stringing together these and other absurdities, all in the style of those his books had taught him, imitating their language as well as he could; and all the while he rode so slowly and the sun mounted so rapidly and with such fervour that it was enough to melt his brains if he had any. Nearly all day he travelled without anything remarkable happening to him, at which he was in despair, for he was anxious to encounter someone at once upon whom to try the might of his strong arm.
diff --git a/examples/blog-multiple-authors/src/pages/post/chapter-iii.md b/examples/blog-multiple-authors/src/pages/post/chapter-iii.md
deleted file mode 100644
index 0b799bc61493..000000000000
--- a/examples/blog-multiple-authors/src/pages/post/chapter-iii.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-layout: ../../layouts/post.astro
-title: Chapter III
-tag: movie
-date: 2021-05-19
-image: /images/chapter-03.jpg
-author: don
-description: Wheren is Related the Droll Way in which Don Quixote Had Himself Dubbed a Knight
----
-
-Harassed by this reflection, he made haste with his scanty pothouse supper, and having finished it called the landlord, and shutting himself into the stable with him, fell on his knees before him, saying, βFrom this spot I rise not, valiant knight, until your courtesy grants me the boon I seek, one that will redound to your praise and the benefit of the human race.β The landlord, seeing his guest at his feet and hearing a speech of this kind, stood staring at him in bewilderment, not knowing what to do or say, and entreating him to rise, but all to no purpose until he had agreed to grant the boon demanded of him. βI looked for no less, my lord, from your High Magnificence,β replied Don Quixote, βand I have to tell you that the boon I have asked and your liberality has granted is that you shall dub me knight to-morrow morning, and that to-night I shall watch my arms in the chapel of this your castle; thus to-morrow, as I have said, will be accomplished what I so much desire, enabling me lawfully to roam through all the four quarters of the world seeking adventures on behalf of those in distress, as is the duty of chivalry and of knights-errant like myself, whose ambition is directed to such deeds.β
-
-The landlord, who, as has been mentioned, was something of a wag, and had already some suspicion of his guestβs want of wits, was quite convinced of it on hearing talk of this kind from him, and to make sport for the night he determined to fall in with his humour. So he told him he was quite right in pursuing the object he had in view, and that such a motive was natural and becoming in cavaliers as distinguished as he seemed and his gallant bearing showed him to be; and that he himself in his younger days had followed the same honourable calling, roaming in quest of adventures in various parts of the world, among others the Curing-grounds of Malaga, the Isles of Riaran, the Precinct of Seville, the Little Market of Segovia, the Olivera of Valencia, the Rondilla of Granada, the Strand of San Lucar, the Colt of Cordova, the Taverns of Toledo, and divers other quarters, where he had proved the nimbleness of his feet and the lightness of his fingers, doing many wrongs, cheating many widows, ruining maids and swindling minors, and, in short, bringing himself under the notice of almost every tribunal and court of justice in Spain; until at last he had retired to this castle of his, where he was living upon his property and upon that of others; and where he received all knights-errant of whatever rank or condition they might be, all for the great love he bore them and that they might share their substance with him in return for his benevolence. He told him, moreover, that in this castle of his there was no chapel in which he could watch his armour, as it had been pulled down in order to be rebuilt, but that in a case of necessity it might, he knew, be watched anywhere, and he might watch it that night in a courtyard of the castle, and in the morning, God willing, the requisite ceremonies might be performed so as to have him dubbed a knight, and so thoroughly dubbed that nobody could be more so. He asked if he had any money with him, to which Don Quixote replied that he had not a farthing, as in the histories of knights-errant he had never read of any of them carrying any. On this point the landlord told him he was mistaken; for, though not recorded in the histories, because in the authorβs opinion there was no need to mention anything so obvious and necessary as money and clean shirts, it was not to be supposed therefore that they did not carry them, and he might regard it as certain and established that all knights-errant (about whom there were so many full and unimpeachable books) carried well-furnished purses in case of emergency, and likewise carried shirts and a little box of ointment to cure the wounds they received. For in those plains and deserts where they engaged in combat and came out wounded, it was not always that there was someone to cure them, unless indeed they had for a friend some sage magician to succour them at once by fetching through the air upon a cloud some damsel or dwarf with a vial of water of such virtue that by tasting one drop of it they were cured of their hurts and wounds in an instant and left as sound as if they had not received any damage whatever. But in case this should not occur, the knights of old took care to see that their squires were provided with money and other requisites, such as lint and ointments for healing purposes; and when it happened that knights had no squires (which was rarely and seldom the case) they themselves carried everything in cunning saddle-bags that were hardly seen on the horseβs croup, as if it were something else of more importance, because, unless for some such reason, carrying saddle-bags was not very favourably regarded among knights-errant. He therefore advised him (and, as his godson so soon to be, he might even command him) never from that time forth to travel without money and the usual requirements, and he would find the advantage of them when he least expected it.
diff --git a/examples/blog-multiple-authors/src/pages/posts/[...page].astro b/examples/blog-multiple-authors/src/pages/posts/[...page].astro
deleted file mode 100644
index 3c64888558b1..000000000000
--- a/examples/blog-multiple-authors/src/pages/posts/[...page].astro
+++ /dev/null
@@ -1,83 +0,0 @@
----
-import MainHead from "../../components/MainHead.astro";
-import Nav from "../../components/Nav.astro";
-import PostPreview from "../../components/PostPreview.astro";
-import Pagination from "../../components/Pagination.astro";
-import authorData from "../../data/authors.json";
-
-export async function getStaticPaths({ paginate, rss }) {
- const allPosts = await Astro.glob("../post/*.md");
- const sortedPosts = allPosts.sort(
- (a, b) => new Date(b.frontmatter.date).valueOf() - new Date(a.frontmatter.date).valueOf()
- );
-
- // Generate an RSS feed from this collection of posts.
- // NOTE: This is disabled by default, since it requires `site` to be set in your "astro.config.mjs" file.
- // rss({
- // title: 'Donβs Blog',
- // description: 'An example blog on Astro',
- // customData: `en-us`,
- // items: sortedPosts.map(item => ({
- // title: item.title,
- // description: item.description,
- // link: item.url,
- // pubDate: item.date,
- // })),
- // });
-
- // Return a paginated collection of paths for all posts
- return paginate(sortedPosts, { pageSize: 1 });
-}
-
-// page
-const title = "Donβs Blog";
-const description = "An example blog on Astro";
-const canonicalURL = new URL(Astro.url.pathname, Astro.site);
-const { page } = Astro.props;
----
-
-
-
- {title}
-
-
-
-
-
-
-
-
-
-
All Posts
- {page.start + 1}β{page.end + 1} of {page.total}
- {page.data.map((post) => (
-
- ))}
-
-
-
-
-
diff --git a/examples/blog-multiple-authors/src/styles/global.css b/examples/blog-multiple-authors/src/styles/global.css
deleted file mode 100644
index 408d2b9de844..000000000000
--- a/examples/blog-multiple-authors/src/styles/global.css
+++ /dev/null
@@ -1,25 +0,0 @@
-body {
- font-family: 'Spectral', serif;
- line-height: 1.4;
-}
-
-p {
- line-height: 2;
-}
-
-a {
- color: crimson;
-}
-
-img {
- max-width: 100%;
- height: auto;
-}
-
-.wrapper {
- max-width: 60rem;
- margin-left: auto;
- margin-right: auto;
- padding-left: 2rem;
- padding-right: 2rem;
-}
diff --git a/examples/blog-multiple-authors/tsconfig.json b/examples/blog-multiple-authors/tsconfig.json
deleted file mode 100644
index 4db6ee7011ac..000000000000
--- a/examples/blog-multiple-authors/tsconfig.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "compilerOptions": {
- // Enable top-level await, and other modern ESM features.
- "target": "ESNext",
- "module": "ESNext",
- // Enable node-style module resolution, for things like npm package imports.
- "moduleResolution": "node",
- // Enable JSON imports.
- "resolveJsonModule": true,
- // Enable stricter transpilation for better output.
- "isolatedModules": true,
- // Add type definitions for our Astro runtime.
- "types": ["astro/client"]
- }
-}
diff --git a/examples/component/demo/public/robots.txt b/examples/component/demo/public/robots.txt
deleted file mode 100644
index 1f53798bb4fe..000000000000
--- a/examples/component/demo/public/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow: /
diff --git a/examples/docs/src/components/HeadSEO.astro b/examples/docs/src/components/HeadSEO.astro
index 43a19c52b341..e3fa7b992858 100644
--- a/examples/docs/src/components/HeadSEO.astro
+++ b/examples/docs/src/components/HeadSEO.astro
@@ -1,5 +1,5 @@
---
-import { SITE, OPEN_GRAPH } from "../config.ts";
+import { SITE, OPEN_GRAPH } from "../config";
export interface Props {
content: any;
site: any;
diff --git a/examples/docs/src/components/Header/Header.astro b/examples/docs/src/components/Header/Header.astro
index 0e493b25d490..650c934119be 100644
--- a/examples/docs/src/components/Header/Header.astro
+++ b/examples/docs/src/components/Header/Header.astro
@@ -1,11 +1,11 @@
---
-import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from "../../languages.ts";
-import * as CONFIG from "../../config.ts";
+import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from "../../languages";
+import * as CONFIG from "../../config";
import AstroLogo from "./AstroLogo.astro";
import SkipToContent from "./SkipToContent.astro";
-import SidebarToggle from "./SidebarToggle.tsx";
-import LanguageSelect from "./LanguageSelect.tsx";
-import Search from "./Search.tsx";
+import SidebarToggle from "./SidebarToggle";
+import LanguageSelect from "./LanguageSelect";
+import Search from "./Search";
const { currentPage } = Astro.props;
const lang = currentPage && getLanguageFromURL(currentPage);
diff --git a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
index 68c70de2afe6..f71610598d7d 100644
--- a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
+++ b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
@@ -1,6 +1,6 @@
---
-import { getLanguageFromURL } from "../../languages.ts";
-import { SIDEBAR } from "../../config.ts";
+import { getLanguageFromURL } from "../../languages";
+import { SIDEBAR } from "../../config";
const { currentPage } = Astro.props;
const currentPageMatch = currentPage.slice(1);
const langCode = getLanguageFromURL(currentPage);
diff --git a/examples/docs/src/components/PageContent/PageContent.astro b/examples/docs/src/components/PageContent/PageContent.astro
index 11c130b0517e..e0d96b57cfc1 100644
--- a/examples/docs/src/components/PageContent/PageContent.astro
+++ b/examples/docs/src/components/PageContent/PageContent.astro
@@ -1,6 +1,6 @@
---
import MoreMenu from "../RightSidebar/MoreMenu.astro";
-import TableOfContents from "../RightSidebar/TableOfContents.tsx";
+import TableOfContents from "../RightSidebar/TableOfContents";
const { content, githubEditUrl } = Astro.props;
const title = content.title;
diff --git a/examples/docs/src/components/RightSidebar/MoreMenu.astro b/examples/docs/src/components/RightSidebar/MoreMenu.astro
index 9b0e426cf8d8..9c7eddacd35b 100644
--- a/examples/docs/src/components/RightSidebar/MoreMenu.astro
+++ b/examples/docs/src/components/RightSidebar/MoreMenu.astro
@@ -1,5 +1,5 @@
---
-import ThemeToggleButton from "./ThemeToggleButton.tsx";
+import ThemeToggleButton from "./ThemeToggleButton";
import * as CONFIG from "../../config";
const { editHref } = Astro.props;
const showMoreSection = CONFIG.COMMUNITY_INVITE_URL || editHref;
diff --git a/examples/docs/src/components/RightSidebar/RightSidebar.astro b/examples/docs/src/components/RightSidebar/RightSidebar.astro
index 1406b065e7a7..c009d2202dd1 100644
--- a/examples/docs/src/components/RightSidebar/RightSidebar.astro
+++ b/examples/docs/src/components/RightSidebar/RightSidebar.astro
@@ -1,5 +1,5 @@
---
-import TableOfContents from "./TableOfContents.tsx";
+import TableOfContents from "./TableOfContents";
import MoreMenu from "./MoreMenu.astro";
const { content, githubEditUrl } = Astro.props;
const headings = content.astro.headings;
diff --git a/examples/starter/.vscode/extensions.json b/examples/env-vars/.vscode/extensions.json
similarity index 100%
rename from examples/starter/.vscode/extensions.json
rename to examples/env-vars/.vscode/extensions.json
diff --git a/examples/starter/.vscode/launch.json b/examples/env-vars/.vscode/launch.json
similarity index 100%
rename from examples/starter/.vscode/launch.json
rename to examples/env-vars/.vscode/launch.json
diff --git a/examples/env-vars/src/env.d.ts b/examples/env-vars/src/env.d.ts
index 35cb370765e8..a44cdaa491e2 100644
--- a/examples/env-vars/src/env.d.ts
+++ b/examples/env-vars/src/env.d.ts
@@ -1,5 +1,8 @@
///
+// Use this file to type your environment variables!
+// See https://docs.astro.build/en/guides/environment-variables/#intellisense-for-typescript for more information
+
interface ImportMetaEnv {
readonly DB_PASSWORD: string;
readonly PUBLIC_SOME_KEY: string;
diff --git a/examples/framework-alpine/.vscode/extensions.json b/examples/framework-alpine/.vscode/extensions.json
new file mode 100644
index 000000000000..22a15055d638
--- /dev/null
+++ b/examples/framework-alpine/.vscode/extensions.json
@@ -0,0 +1,4 @@
+{
+ "recommendations": ["astro-build.astro-vscode"],
+ "unwantedRecommendations": []
+}
diff --git a/examples/framework-alpine/.vscode/launch.json b/examples/framework-alpine/.vscode/launch.json
new file mode 100644
index 000000000000..d6422097621f
--- /dev/null
+++ b/examples/framework-alpine/.vscode/launch.json
@@ -0,0 +1,11 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "command": "./node_modules/.bin/astro dev",
+ "name": "Development server",
+ "request": "launch",
+ "type": "node-terminal"
+ }
+ ]
+}
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index 679ae5f69afb..44e492fe3edf 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -9,6 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
+ "@types/alpinejs": "^3.7.0",
"astro": "^1.0.0-rc.6"
},
"dependencies": {
diff --git a/examples/framework-alpine/src/components/Counter.astro b/examples/framework-alpine/src/components/Counter.astro
index 4d0b62a6005d..0aebebb985b6 100644
--- a/examples/framework-alpine/src/components/Counter.astro
+++ b/examples/framework-alpine/src/components/Counter.astro
@@ -2,10 +2,14 @@
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
-const { initialCount = 0 } = Astro.props;
+export interface Props {
+ initialCount?: number;
+}
+
+const { initialCount = 0 } = Astro.props as Props;
---
-