diff --git a/.changeset/beige-zebras-ring.md b/.changeset/beige-zebras-ring.md deleted file mode 100644 index f81f6aa6fcfe..000000000000 --- a/.changeset/beige-zebras-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Add support for autocomplete attribute to the HTML button type. diff --git a/.changeset/blue-ladybugs-march.md b/.changeset/blue-ladybugs-march.md deleted file mode 100644 index 4394b6ad35e2..000000000000 --- a/.changeset/blue-ladybugs-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes duplicated CSS modules content when it's imported by both Astro files and framework components diff --git a/.changeset/chilly-tips-breathe.md b/.changeset/chilly-tips-breathe.md deleted file mode 100644 index 6e622f8264df..000000000000 --- a/.changeset/chilly-tips-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Export JSX namespace from `astro/jsx-runtime` for language tooling to consume diff --git a/.changeset/eight-ears-call.md b/.changeset/eight-ears-call.md deleted file mode 100644 index 41a9140a7a24..000000000000 --- a/.changeset/eight-ears-call.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/preact': patch -'@astrojs/react': patch -'@astrojs/solid-js': patch ---- - -Improves compatability with the [Qwik adapter](https://github.com/QwikDev/astro) diff --git a/.changeset/forty-actors-wash.md b/.changeset/forty-actors-wash.md deleted file mode 100644 index 4a5d79d0a625..000000000000 --- a/.changeset/forty-actors-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Filter out Svelte's unknown data prop warnings diff --git a/.changeset/gold-zebras-burn.md b/.changeset/gold-zebras-burn.md deleted file mode 100644 index 8cb15a42beaf..000000000000 --- a/.changeset/gold-zebras-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves error message for the case where two similarly named files result in the same content entry. diff --git a/.changeset/great-beans-check.md b/.changeset/great-beans-check.md new file mode 100644 index 000000000000..69e188bd0a79 --- /dev/null +++ b/.changeset/great-beans-check.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes error overlay display on URI malformed error diff --git a/.changeset/great-parrots-raise.md b/.changeset/great-parrots-raise.md deleted file mode 100644 index 8a78a298a937..000000000000 --- a/.changeset/great-parrots-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Forwards errors if a Svelte component fails to instantiate in the client diff --git a/.changeset/old-goats-occur.md b/.changeset/old-goats-occur.md deleted file mode 100644 index 8224bbabbd44..000000000000 --- a/.changeset/old-goats-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Prevents unnecessary URI decoding when rendering a route diff --git a/.changeset/olive-sloths-brush.md b/.changeset/olive-sloths-brush.md new file mode 100644 index 000000000000..574af00902b0 --- /dev/null +++ b/.changeset/olive-sloths-brush.md @@ -0,0 +1,5 @@ +--- +'@astrojs/node': patch +--- + +Fixes a bug where an error while serving response stopped the server. diff --git a/.changeset/quiet-weeks-teach.md b/.changeset/quiet-weeks-teach.md new file mode 100644 index 000000000000..bfbbb737c168 --- /dev/null +++ b/.changeset/quiet-weeks-teach.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prevents ANSI codes from rendering in the error overlay diff --git a/.changeset/rare-ants-swim.md b/.changeset/rare-ants-swim.md deleted file mode 100644 index 1bde7bf14258..000000000000 --- a/.changeset/rare-ants-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves errors in certain places to also report their causes. diff --git a/.changeset/rude-deers-turn.md b/.changeset/rude-deers-turn.md deleted file mode 100644 index ee54f44163ee..000000000000 --- a/.changeset/rude-deers-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/tailwind': minor ---- - -Adds `nesting` option to enable `tailwindcss/nesting` support diff --git a/.changeset/shy-knives-unite.md b/.changeset/shy-knives-unite.md deleted file mode 100644 index 5aa3c87bfd00..000000000000 --- a/.changeset/shy-knives-unite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Update Sharp version to ^0.33.1 diff --git a/.changeset/silent-wasps-learn.md b/.changeset/silent-wasps-learn.md new file mode 100644 index 000000000000..60f8d4c0efc9 --- /dev/null +++ b/.changeset/silent-wasps-learn.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Toggle dev toolbar hitbox height when toolbar is visible diff --git a/.changeset/small-emus-deny.md b/.changeset/small-emus-deny.md deleted file mode 100644 index 4926c0655c81..000000000000 --- a/.changeset/small-emus-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Prevents dev toolbar tooltip from overflowing outside of the screen diff --git a/.changeset/small-snakes-build.md b/.changeset/small-snakes-build.md new file mode 100644 index 000000000000..9f1c9f8ac0ec --- /dev/null +++ b/.changeset/small-snakes-build.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes remote images with encoded characters diff --git a/.changeset/soft-sheep-glow.md b/.changeset/soft-sheep-glow.md deleted file mode 100644 index 90b26828a350..000000000000 --- a/.changeset/soft-sheep-glow.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@astrojs/alpinejs': patch -'@astrojs/lit': patch -'@astrojs/markdoc': patch -'@astrojs/mdx': patch -'@astrojs/node': patch -'@astrojs/partytown': patch -'@astrojs/preact': patch -'@astrojs/react': patch -'@astrojs/sitemap': patch -'@astrojs/solid-js': patch -'@astrojs/svelte': patch -'@astrojs/tailwind': patch -'@astrojs/vercel': patch -'@astrojs/vue': patch ---- - -Updates README diff --git a/.changeset/tidy-dogs-remain.md b/.changeset/tidy-dogs-remain.md deleted file mode 100644 index aef030c9d05c..000000000000 --- a/.changeset/tidy-dogs-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Adds a helpful warning message for when an exported API Route is not uppercase. diff --git a/.changeset/weak-oranges-relate.md b/.changeset/weak-oranges-relate.md new file mode 100644 index 000000000000..c61c4b7e05e8 --- /dev/null +++ b/.changeset/weak-oranges-relate.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +`` srcset now parses encoded paths correctly diff --git a/.changeset/yellow-yaks-promise.md b/.changeset/yellow-yaks-promise.md new file mode 100644 index 000000000000..2b9aa21ff90c --- /dev/null +++ b/.changeset/yellow-yaks-promise.md @@ -0,0 +1,5 @@ +--- +"@astrojs/vercel": patch +--- + +Fixes an issue where a build could not complete on Node 21. diff --git a/examples/basics/package.json b/examples/basics/package.json index e6e61c6d70e5..ff55e0d315af 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 32e32622640d..6e0bd7a2cf9e 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^2.0.2", + "@astrojs/mdx": "^2.0.3", "@astrojs/rss": "^4.0.1", - "@astrojs/sitemap": "^3.0.3", - "astro": "^4.0.7" + "@astrojs/sitemap": "^3.0.4", + "astro": "^4.0.8" } } diff --git a/examples/component/package.json b/examples/component/package.json index 6b056cff0f4b..67ec5a3a801d 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" }, "peerDependencies": { "astro": "^3.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 8747cae30a6b..da02b10cec53 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/alpinejs": "^0.3.1", + "@astrojs/alpinejs": "^0.3.2", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.0.7" + "astro": "^4.0.8" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 483b3209dda0..a12879c13052 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/lit": "^4.0.0", + "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.0.7", + "astro": "^4.0.8", "lit": "^2.8.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 725a8252b349..235c0015ef11 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,12 +11,12 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.0.1", - "@astrojs/react": "^3.0.8", - "@astrojs/solid-js": "^3.0.2", - "@astrojs/svelte": "^5.0.2", - "@astrojs/vue": "^4.0.5", - "astro": "^4.0.7", + "@astrojs/preact": "^3.0.2", + "@astrojs/react": "^3.0.9", + "@astrojs/solid-js": "^3.0.3", + "@astrojs/svelte": "^5.0.3", + "@astrojs/vue": "^4.0.6", + "astro": "^4.0.8", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index d767c0b5fdd1..182488e94ae6 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.0.1", + "@astrojs/preact": "^3.0.2", "@preact/signals": "^1.2.1", - "astro": "^4.0.7", + "astro": "^4.0.8", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index bf1e2ee34d23..c82665504727 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^3.0.8", + "@astrojs/react": "^3.0.9", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.0.7", + "astro": "^4.0.8", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index a283d3f78473..a872508abefa 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/solid-js": "^3.0.2", - "astro": "^4.0.7", + "@astrojs/solid-js": "^3.0.3", + "astro": "^4.0.8", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index e14692cf3a60..86e67d122441 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/svelte": "^5.0.2", - "astro": "^4.0.7", + "@astrojs/svelte": "^5.0.3", + "astro": "^4.0.8", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 851ac283bc0e..29ad35c9275e 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/vue": "^4.0.5", - "astro": "^4.0.7", + "@astrojs/vue": "^4.0.6", + "astro": "^4.0.8", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 1a7646ac8b66..b10f2aaeba20 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/node": "^7.0.2", - "astro": "^4.0.7" + "@astrojs/node": "^7.0.3", + "astro": "^4.0.8" } } diff --git a/examples/integration/index.ts b/examples/integration/index.ts index 54d917e78e9f..8b34afd2334a 100644 --- a/examples/integration/index.ts +++ b/examples/integration/index.ts @@ -10,11 +10,11 @@ export default function createIntegration(): AstroIntegration { // See the @astrojs/react integration for an example // https://github.com/withastro/astro/blob/main/packages/integrations/react/src/index.ts }, - 'astro:build:setup': ({ pages, updateConfig }) => { + 'astro:build:setup': () => { // See the @astrojs/lit integration for an example // https://github.com/withastro/astro/blob/main/packages/integrations/lit/src/index.ts }, - 'astro:build:done': ({ dir, routes }) => { + 'astro:build:done': () => { // See the @astrojs/partytown integration for an example // https://github.com/withastro/astro/blob/main/packages/integrations/partytown/src/index.ts }, diff --git a/examples/integration/package.json b/examples/integration/package.json index e59c8e1ef9d0..cac406ddca81 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" }, "peerDependencies": { "astro": "^3.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index fdea138649af..69424f74c935 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -12,8 +12,11 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "@astrojs/node": "^7.0.2", - "astro": "^4.0.7", + "@astrojs/node": "^7.0.3", + "astro": "^4.0.8", "html-minifier": "^4.0.0" + }, + "devDependencies": { + "@types/html-minifier": "^4.0.5" } } diff --git a/examples/middleware/src/middleware.ts b/examples/middleware/src/middleware.ts index eb764453545c..f92b64d4404a 100644 --- a/examples/middleware/src/middleware.ts +++ b/examples/middleware/src/middleware.ts @@ -3,12 +3,15 @@ import htmlMinifier from 'html-minifier'; const limit = 50; -const loginInfo = { +const loginInfo: { + token: undefined | string; + currentTime: undefined | number; +} = { token: undefined, currentTime: undefined, }; -export const minifier = defineMiddleware(async (context, next) => { +export const minifier = defineMiddleware(async (_context, next) => { const response = await next(); // check if the response is returning some HTML if (response.headers.get('content-type') === 'text/html') { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 768f60a0952e..860897d1bf8b 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index e77e7bfc319d..2a1c4d61a8e4 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 124a9f059baa..3332fc3a332e 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.0.7" + "astro": "^4.0.8" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 30d9218dda55..7ed70e2bf89d 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -12,9 +12,9 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "@astrojs/node": "^7.0.2", - "@astrojs/svelte": "^5.0.2", - "astro": "^4.0.7", + "@astrojs/node": "^7.0.3", + "@astrojs/svelte": "^5.0.3", + "astro": "^4.0.8", "svelte": "^4.2.5" } } diff --git a/examples/ssr/src/api.ts b/examples/ssr/src/api.ts index 1be1f54f00ec..ec4ba9eec76d 100644 --- a/examples/ssr/src/api.ts +++ b/examples/ssr/src/api.ts @@ -32,7 +32,7 @@ async function get( }); if (!response.ok) { // TODO make this better... - return null; + throw new Error('Fetch failed'); } return cb(response); } diff --git a/examples/ssr/src/pages/api/cart.ts b/examples/ssr/src/pages/api/cart.ts index 2449e0c945b5..8d64ec7d84de 100644 --- a/examples/ssr/src/pages/api/cart.ts +++ b/examples/ssr/src/pages/api/cart.ts @@ -1,4 +1,4 @@ -import { APIContext } from 'astro'; +import type { APIContext } from 'astro'; import { userCartItems } from '../../models/session'; export function GET({ cookies }: APIContext) { @@ -21,7 +21,7 @@ interface AddToCartItem { export async function POST({ cookies, request }: APIContext) { const item: AddToCartItem = await request.json(); - let userId = cookies.get('user-id').value; + let userId = cookies.get('user-id')?.value; if (!userCartItems.has(userId)) { userCartItems.set(userId, new Map()); diff --git a/examples/ssr/src/pages/login.form.async.ts b/examples/ssr/src/pages/login.form.async.ts index 22c1022ed57c..94020d9c9b11 100644 --- a/examples/ssr/src/pages/login.form.async.ts +++ b/examples/ssr/src/pages/login.form.async.ts @@ -1,4 +1,4 @@ -import { APIContext, APIRoute } from 'astro'; +import type { APIContext, APIRoute } from 'astro'; export const POST: APIRoute = ({ cookies }: APIContext) => { // add a new cookie diff --git a/examples/ssr/src/pages/login.form.ts b/examples/ssr/src/pages/login.form.ts index 54ec10f471e7..f3cd50db46c4 100644 --- a/examples/ssr/src/pages/login.form.ts +++ b/examples/ssr/src/pages/login.form.ts @@ -1,4 +1,4 @@ -import { APIContext } from 'astro'; +import type { APIContext } from 'astro'; export function POST({ cookies }: APIContext) { // add a new cookie diff --git a/examples/starlog/README.md b/examples/starlog/README.md new file mode 100644 index 000000000000..da5cb142c056 --- /dev/null +++ b/examples/starlog/README.md @@ -0,0 +1,7 @@ +# Starlog + +## Release notes theme for Astro + +![starlog-gh](https://github.com/doodlemarks/starlog/assets/2244813/9c5c2e46-665a-437e-a971-053db4dbff63) + +Built with Astro and Sass. Supports both dark and light modes. diff --git a/examples/starlog/astro.config.mjs b/examples/starlog/astro.config.mjs new file mode 100644 index 000000000000..b093ec0e02bc --- /dev/null +++ b/examples/starlog/astro.config.mjs @@ -0,0 +1,6 @@ +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + site: 'https://example.com', +}); diff --git a/examples/starlog/package.json b/examples/starlog/package.json new file mode 100644 index 000000000000..8975eaa5cd03 --- /dev/null +++ b/examples/starlog/package.json @@ -0,0 +1,17 @@ +{ + "name": "@example/starlog", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "astro": "^4.0.5", + "sass": "^1.69.5", + "sharp": "^0.32.5" + } +} diff --git a/examples/starlog/public/favicon.svg b/examples/starlog/public/favicon.svg new file mode 100644 index 000000000000..f157bd1c5e28 --- /dev/null +++ b/examples/starlog/public/favicon.svg @@ -0,0 +1,9 @@ + + + + diff --git a/examples/starlog/src/assets/starlog-placeholder-1.jpg b/examples/starlog/src/assets/starlog-placeholder-1.jpg new file mode 100644 index 000000000000..846bdcd45285 Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-1.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-14.jpg b/examples/starlog/src/assets/starlog-placeholder-14.jpg new file mode 100644 index 000000000000..e2e0acb9eff3 Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-14.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-18.jpg b/examples/starlog/src/assets/starlog-placeholder-18.jpg new file mode 100644 index 000000000000..211c85cf54ad Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-18.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-2.jpg b/examples/starlog/src/assets/starlog-placeholder-2.jpg new file mode 100644 index 000000000000..2251c1c49d2f Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-2.jpg differ diff --git a/examples/starlog/src/components/BaseHead.astro b/examples/starlog/src/components/BaseHead.astro new file mode 100644 index 000000000000..e32945c1c8f5 --- /dev/null +++ b/examples/starlog/src/components/BaseHead.astro @@ -0,0 +1,19 @@ +--- +import { ViewTransitions } from 'astro:transitions'; +import SEO, { type Props as SEOProps } from './SEO.astro'; +import { SiteTitle, SiteDescription } from '../consts'; + +export type Props = Partial; +const { title = SiteTitle, name = SiteTitle, description = SiteDescription, ...seo } = Astro.props; +--- + + + + + + + + diff --git a/examples/starlog/src/components/Footer.astro b/examples/starlog/src/components/Footer.astro new file mode 100644 index 000000000000..276550d4ae2c --- /dev/null +++ b/examples/starlog/src/components/Footer.astro @@ -0,0 +1,12 @@ +--- +import '../styles/global.scss'; +--- + + diff --git a/examples/starlog/src/components/FormattedDate.astro b/examples/starlog/src/components/FormattedDate.astro new file mode 100644 index 000000000000..377286d9f421 --- /dev/null +++ b/examples/starlog/src/components/FormattedDate.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes } from 'astro/types'; + +type Props = HTMLAttributes<'time'> & { + date: Date; +}; + +const { date, ...attrs } = Astro.props; +--- + + + + diff --git a/examples/starlog/src/components/Header.astro b/examples/starlog/src/components/Header.astro new file mode 100644 index 000000000000..bbdaf1e70c10 --- /dev/null +++ b/examples/starlog/src/components/Header.astro @@ -0,0 +1,54 @@ +--- +import '../styles/global.scss'; +import { SiteTitle } from '../consts'; +--- + +
+ +
+ + diff --git a/examples/starlog/src/components/SEO.astro b/examples/starlog/src/components/SEO.astro new file mode 100644 index 000000000000..1e2ddcca2777 --- /dev/null +++ b/examples/starlog/src/components/SEO.astro @@ -0,0 +1,87 @@ +--- +import type { ImageMetadata } from 'astro'; +type Image = { + src: string | ImageMetadata; + alt: string; +}; + +type SEOMetadata = { + name: string; + title: string; + description: string; + image?: Image | undefined; + canonicalURL?: URL | string | undefined; + locale?: string; +}; + +type OpenGraph = Partial & { + type?: string; +}; + +type Twitter = Partial & { + handle?: string; + card?: 'summary' | 'summary_large_image'; +}; + +export type Props = SEOMetadata & { + og?: OpenGraph; + twitter?: Twitter; +}; + +const { + name, + title, + description, + image, + locale = 'en', + canonicalURL = new URL(Astro.url.pathname, Astro.site), +} = Astro.props; + +const og = { + name, + title, + description, + canonicalURL, + image, + locale, + type: 'website', + ...(Astro.props.og ?? {}), +} satisfies OpenGraph; + +const twitter = { + name, + title, + description, + canonicalURL, + image, + locale, + card: 'summary_large_image', + ...Astro.props.twitter, +}; + +function normalizeImageUrl(image: string | ImageMetadata) { + return typeof image === 'string' ? image : image.src; +} +--- + + + + + + + + + + + + +{og.image && } +{og.image && } + + + + + + +{twitter.image && } +{twitter.image && } diff --git a/examples/starlog/src/consts.ts b/examples/starlog/src/consts.ts new file mode 100644 index 000000000000..3e91752e1783 --- /dev/null +++ b/examples/starlog/src/consts.ts @@ -0,0 +1,5 @@ +// Place any global data in this file. +// You can import this data from anywhere in your site by using the `import` keyword. + +export const SiteTitle = 'Starlog'; +export const SiteDescription = 'Welcome to my website!'; diff --git a/examples/starlog/src/content/config.ts b/examples/starlog/src/content/config.ts new file mode 100644 index 000000000000..5cc4c697f7e4 --- /dev/null +++ b/examples/starlog/src/content/config.ts @@ -0,0 +1,19 @@ +import { defineCollection, z } from 'astro:content'; + +const releases = defineCollection({ + // Type-check frontmatter using a schema + schema: ({ image }) => + z.object({ + title: z.string(), + description: z.string(), + versionNumber: z.string(), + image: z.object({ + src: image(), + alt: z.string(), + }), + // Transform string to Date object + date: z.date({ coerce: true }), + }), +}); + +export const collections = { releases }; diff --git a/examples/starlog/src/content/releases/1_0.md b/examples/starlog/src/content/releases/1_0.md new file mode 100644 index 000000000000..a5eeff43724a --- /dev/null +++ b/examples/starlog/src/content/releases/1_0.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.0!' +date: '2022-03-21' +versionNumber: '1.0' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-1.jpg' + alt: 'The full Astro logo.' +--- + +## A New World with 1.0 + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-1.jpg) + +Hey there, Nebulous users! We're back with some exciting updates that will turbocharge your Nebulous experience. Here's the lowdown: + +### ๐Ÿฟ New Features & Enhancements + +- **NebulaProtect Supercharged:** Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable. +- **NebulaConnect for Teams:** Collaboration is a breeze with integrated project management tools. +- **Speed Boost Galore:** We've fine-tuned Nebulous for ultimate speed and responsiveness. + +### ๐Ÿž Bug Fixes + +- Kicked pesky crashes out the door for NebulaSync. +- Fixed rare data hiccups during file transfers. +- Nebulous is now even friendly with older devices. + +Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level! diff --git a/examples/starlog/src/content/releases/1_4.md b/examples/starlog/src/content/releases/1_4.md new file mode 100644 index 000000000000..aacab8a847af --- /dev/null +++ b/examples/starlog/src/content/releases/1_4.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.8!' +date: '2022-04-16' +versionNumber: '1.4' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-14.jpg' + alt: 'The full Astro logo.' +--- + +## Go further with 1.4 + +![Nebulous 1.4 Release](../../assets/starlog-placeholder-14.jpg) + +Hello, Nebulous enthusiasts! It's that time againโ€”time for us to unveil the latest and greatest in our tech universe. Buckle up as we introduce you to the future of Nebulous: + +### ๐Ÿฟ New Features & Enhancements + +- **NebulaSync Quantum:** Prepare for a mind-blowing file syncing experience. It's faster, smarter, and more intuitive than ever before. +- **NebulaAI Odyssey:** Welcome to the era of NebulaAI Odysseyโ€”a journey into the boundless possibilities of artificial intelligence. From image manipulation to language translation, Odyssey empowers you like never before. + +### ๐Ÿž Bug Fixes + +- Squashed even more bugs, making NebulaSync and other features more reliable than ever. +- Streamlined data transfer processes for flawless file exchanges. +- Extended support for older devices to ensure everyone enjoys Nebulous. +- Elevating error handling to the next level, ensuring a hiccup-free experience. + +Thank you for being a part of the Nebulous journey. Your feedback fuels our innovation, so don't hesitate to share your thoughts or report any hiccups with our dedicated support team. Together, we're shaping the future of tech with Nebulous! diff --git a/examples/starlog/src/content/releases/1_8.md b/examples/starlog/src/content/releases/1_8.md new file mode 100644 index 000000000000..d300f964c413 --- /dev/null +++ b/examples/starlog/src/content/releases/1_8.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.8!' +date: '2022-06-01' +versionNumber: '1.8' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-18.jpg' + alt: 'The full Astro logo.' +--- + +## Faster, Stronger, Betterer + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-18.jpg) + +Hey there, Nebulous users! We're back with some exciting updates that will turbocharge your Nebulous experience. Here's the lowdown: + +### New Features & Enhancements + +- **NebulaProtect Supercharged:** Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable. +- **NebulaConnect for Teams:** Collaboration is a breeze with integrated project management tools. +- **Speed Boost Galore:** We've fine-tuned Nebulous for ultimate speed and responsiveness. + +### ๐Ÿž Bug Fixes + +- Kicked pesky crashes out the door for NebulaSync. +- Fixed rare data hiccups during file transfers. +- Nebulous is now even friendly with older devices. + +Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level! diff --git a/examples/starlog/src/content/releases/2_0.md b/examples/starlog/src/content/releases/2_0.md new file mode 100644 index 000000000000..6a01d76fc88b --- /dev/null +++ b/examples/starlog/src/content/releases/2_0.md @@ -0,0 +1,38 @@ +--- +title: 'Introducing Nebulous 2.0!' +date: '2022-07-01' +versionNumber: '2.0' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-2.jpg' + alt: 'The full Astro logo.' +--- + +## Introducing Nebulous 2.0! + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-2.jpg) + +Greetings, Nebulous users! We're excited to bring you the latest updates in our [ever-evolving tech ecosystem](#). In this release, we're introducing some exciting new features and squashing a few pesky bugs. Let's dive in! + +### ๐Ÿฟ New Features & Enhancements + +- **NebulaSync v2.0:** We're thrilled to introduce NebulaSync 2.0, our revamped file synchronization tool. It now offers blazing-fast sync speeds, improved reliability, and enhanced cross-device compatibility. +- **Enhanced NebulaProtect:** NebulaProtect, our comprehensive security suite, has received a major update. Enjoy advanced threat detection, and real-time monitoring. +- **NebulaConnect for Teams:** Collaborate effortlessly with NebulaConnect for Teams. This powerful feature allows seamless integration with your favorite project management tools, enabling you to manage tasks, share documents, and track progress in real-time. + +### ๐Ÿž Bug Fixes + +- Resolved occasional crashing issues when using NebulaSync. +- Fixed a bug causing data corruption in rare cases during file transfers. +- Improved compatibility with older devices to ensure a seamless experience for all users. +- Enhanced error handling and reporting for a smoother user experience. + +### ๐Ÿ‘€ Coming Soon + +We can't spill all the beans just yet, but we're thrilled to give you a sneak peek of what's coming in the next Nebulous release: + +- **NebulaWallet:** A secure and user-friendly cryptocurrency wallet integrated directly into Nebulous for seamless digital asset management. +- **NebulaConnect Mobile:** Take your collaboration to the next level with our upcoming mobile app, enabling you to work on the go. +- **NebulaLabs:** Our developer tools and API enhancements, providing you with even more customization options and possibilities. + +If you have any suggestions or encounter any issues, don't hesitate to reach out to our support team. Together, we'll continue to make Nebulous the ultimate tech solution for you. diff --git a/examples/starlog/src/layouts/IndexLayout.astro b/examples/starlog/src/layouts/IndexLayout.astro new file mode 100644 index 000000000000..3f0bd0c96357 --- /dev/null +++ b/examples/starlog/src/layouts/IndexLayout.astro @@ -0,0 +1,23 @@ +--- +import BaseHead, { type Props as HeadProps } from '../components/BaseHead.astro'; +import Header from '../components/Header.astro'; +import Footer from '../components/Footer.astro'; + +type Props = HeadProps; + +const { ...head } = Astro.props; +--- + + + + + + + +
+
+ +