Migrate to astro v5 beta: first round
This commit is contained in:
1507
package-lock.json
generated
1507
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@@ -23,12 +23,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@astrolib/analytics": "^0.5.0",
|
||||
"@astrolib/seo": "^1.0.0-beta.6",
|
||||
"@astrojs/sitemap": "^3.2.0",
|
||||
"@astrolib/analytics": "^0.6.1",
|
||||
"@astrolib/seo": "^1.0.0-beta.8",
|
||||
"@fontsource-variable/inter": "^5.1.0",
|
||||
"astro": "^4.15.5",
|
||||
"astro-embed": "^0.7.2",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"astro-icon": "^1.1.1",
|
||||
"limax": "4.1.0",
|
||||
"lodash.merge": "^4.6.2",
|
||||
@@ -36,34 +35,34 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/mdx": "^3.1.6",
|
||||
"@astrojs/mdx": "^4.0.0-beta.2",
|
||||
"@astrojs/partytown": "^2.1.2",
|
||||
"@astrojs/tailwind": "5.1.0",
|
||||
"@eslint/js": "^9.10.0",
|
||||
"@astrojs/tailwind": "^5.1.1",
|
||||
"@eslint/js": "^9.11.1",
|
||||
"@iconify-json/flat-color-icons": "^1.2.0",
|
||||
"@iconify-json/tabler": "^1.2.3",
|
||||
"@iconify-json/tabler": "^1.2.4",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@typescript-eslint/eslint-plugin": "^8.6.0",
|
||||
"@typescript-eslint/parser": "^8.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
||||
"@typescript-eslint/parser": "^8.8.0",
|
||||
"astro-compress": "2.3.1",
|
||||
"astro-eslint-parser": "^1.0.3",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint": "^9.11.1",
|
||||
"eslint-plugin-astro": "^1.2.4",
|
||||
"globals": "^15.9.0",
|
||||
"globals": "^15.10.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"reading-time": "^1.5.0",
|
||||
"sharp": "0.33.5",
|
||||
"tailwind-merge": "^2.5.2",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"tailwind-merge": "^2.5.3",
|
||||
"tailwindcss": "^3.4.13",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.6.0",
|
||||
"typescript-eslint": "^8.8.0",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const metadataDefinition = () =>
|
||||
z
|
||||
@@ -46,6 +47,7 @@ const metadataDefinition = () =>
|
||||
.optional();
|
||||
|
||||
const postCollection = defineCollection({
|
||||
loader: glob({ pattern: ['*.md', '*.mdx'], base: 'src/data/post' }),
|
||||
schema: z.object({
|
||||
publishDate: z.date().optional(),
|
||||
updateDate: z.date().optional(),
|
||||
|
@@ -9,7 +9,6 @@ tags:
|
||||
---
|
||||
|
||||
import Logo from '~/components/Logo.astro';
|
||||
import { YouTube, Tweet, Vimeo } from 'astro-embed';
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
@@ -191,14 +190,11 @@ import Logo from "~/components/Logo.astro";
|
||||
|
||||
### Youtube
|
||||
|
||||
<YouTube id="y9n6HkftavM" />
|
||||
|
||||
### Tweet
|
||||
|
||||
<Tweet id="https://twitter.com/Steve8708/status/1598713161339015173" />
|
||||
|
||||
### Vimeo
|
||||
|
||||
<Vimeo id="178430038" />
|
||||
|
||||
[[Top]](#top)
|
@@ -13,7 +13,7 @@ import Analytics from '~/components/common/Analytics.astro';
|
||||
import BasicScripts from '~/components/common/BasicScripts.astro';
|
||||
|
||||
// Comment the line below to disable View Transitions
|
||||
import { ViewTransitions } from 'astro:transitions';
|
||||
import { ClientRouter } from 'astro:transitions';
|
||||
|
||||
import type { MetaData as MetaDataType } from '~/types';
|
||||
|
||||
@@ -37,7 +37,7 @@ const { language, textDirection } = I18N;
|
||||
<Analytics />
|
||||
|
||||
<!-- Comment the line below to disable View Transitions -->
|
||||
<ViewTransitions fallback="swap" />
|
||||
<ClientRouter fallback="swap" />
|
||||
</head>
|
||||
|
||||
<body class="antialiased text-default bg-page tracking-tight">
|
||||
|
@@ -11,7 +11,7 @@ import Features3 from '~/components/widgets/Features3.astro';
|
||||
import FAQs from '~/components/widgets/FAQs.astro';
|
||||
import Brands from '~/components/widgets/Brands.astro';
|
||||
|
||||
import { YouTube } from 'astro-embed';
|
||||
// import { YouTube } from 'astro-embed';
|
||||
|
||||
const metadata = {
|
||||
title: 'Startup Landing Page',
|
||||
@@ -46,7 +46,7 @@ const metadata = {
|
||||
</Fragment>
|
||||
|
||||
<Fragment slot="image">
|
||||
<YouTube id="gxBkghlglTg" title="Astro just Launched.... Could it be the ultimate web framework?" />
|
||||
<!-- <YouTube id="gxBkghlglTg" title="Astro just Launched.... Could it be the ultimate web framework?" /> -->
|
||||
<style is:inline>
|
||||
lite-youtube {
|
||||
margin: 0 auto;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import type { PaginateFunction } from 'astro';
|
||||
import { getCollection } from 'astro:content';
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import type { CollectionEntry } from 'astro:content';
|
||||
import type { Post } from '~/types';
|
||||
import { APP_BLOG } from 'astrowind:config';
|
||||
@@ -41,8 +41,8 @@ const generatePermalink = async ({
|
||||
};
|
||||
|
||||
const getNormalizedPost = async (post: CollectionEntry<'post'>): Promise<Post> => {
|
||||
const { id, slug: rawSlug = '', data } = post;
|
||||
const { Content, remarkPluginFrontmatter } = await post.render();
|
||||
const { id, data } = post;
|
||||
const { Content, remarkPluginFrontmatter } = await render(post);
|
||||
|
||||
const {
|
||||
publishDate: rawPublishDate = new Date(),
|
||||
@@ -57,7 +57,7 @@ const getNormalizedPost = async (post: CollectionEntry<'post'>): Promise<Post> =
|
||||
metadata = {},
|
||||
} = data;
|
||||
|
||||
const slug = cleanSlug(rawSlug); // cleanSlug(rawSlug.split('/').pop());
|
||||
const slug = cleanSlug(id); // cleanSlug(rawSlug.split('/').pop());
|
||||
const publishDate = new Date(rawPublishDate);
|
||||
const updateDate = rawUpdateDate ? new Date(rawUpdateDate) : undefined;
|
||||
|
||||
|
@@ -8,5 +8,6 @@
|
||||
"~/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist/"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user