Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Astro v5 #10

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
953c4f2
Migrate to astro v5 beta: first round
prototypa Oct 4, 2024
00d09b6
Fix project commands table
prototypa Oct 4, 2024
bcd05b9
Fix formatt with Prettier
prototypa Oct 4, 2024
0e262d8
Update dependencies to v5.0.0-beta.4
prototypa Oct 7, 2024
56ef652
Update content to Astro v5
prototypa Oct 7, 2024
0795d3c
Minor content adjustment
prototypa Oct 10, 2024
3a5823b
Reactivate astro-embed
prototypa Oct 10, 2024
357f735
Update dependencies (astro-auto-import to v0.4.4)
prototypa Oct 10, 2024
f36ba4c
Fixed the default port in which the local dev server starts - 4321 in…
annjose Nov 20, 2024
5b0eed4
Update to Astro v5
prototypa Dec 9, 2024
6570377
Merge branch 'main' into migration-astro-v5
prototypa Dec 11, 2024
8544668
Fix astro check errors
prototypa Dec 11, 2024
082ab11
Run npm run fix
prototypa Dec 11, 2024
77a75c2
Merge pull request #565 from onwidget/migration-astro-v5
prototypa Dec 11, 2024
bbcbde8
Merge pull request #553 from annjose/patch-1
prototypa Dec 11, 2024
c55bb29
Initial commit
engnadeau Dec 18, 2024
59ca481
--wip-- [skip ci]
engnadeau Dec 18, 2024
4d0fbcc
feat: replaced favicons
engnadeau Dec 18, 2024
c39f98b
--wip-- [skip ci]
engnadeau Dec 18, 2024
932269b
--wip-- [skip ci]
engnadeau Dec 18, 2024
c0936b8
--wip-- [skip ci]
engnadeau Dec 18, 2024
feff450
--wip-- [skip ci]
engnadeau Dec 18, 2024
59fa5fe
--wip-- [skip ci]
engnadeau Dec 18, 2024
09f1ac8
--wip-- [skip ci]
engnadeau Dec 18, 2024
22e92bd
--wip-- [skip ci]
engnadeau Dec 18, 2024
31b4135
--wip-- [skip ci]
engnadeau Dec 18, 2024
2220e63
--wip-- [skip ci]
engnadeau Dec 18, 2024
cad38ce
--wip-- [skip ci]
engnadeau Dec 18, 2024
319d200
--wip-- [skip ci]
engnadeau Dec 18, 2024
2bb9952
feat: added logos
engnadeau Dec 18, 2024
4109289
fix: fixed brands widget for logos
engnadeau Dec 18, 2024
877f103
feat: added brands wideth
engnadeau Dec 18, 2024
2607bb6
chore: deleted obsolete
engnadeau Dec 18, 2024
dfe6f77
feat: improved landing
engnadeau Dec 18, 2024
35d2c6b
feat: added CDL and Next AI
engnadeau Dec 18, 2024
e5ae4cc
feat: added post
engnadeau Dec 18, 2024
fdadf95
feat: updated nav naming
engnadeau Dec 18, 2024
ed35267
feat: added post
engnadeau Dec 18, 2024
85f244f
feat: added post
engnadeau Dec 18, 2024
2cc2534
feat: added post
engnadeau Dec 18, 2024
0610248
fix: fixed relative nav
engnadeau Dec 18, 2024
bebf03b
feat: added post
engnadeau Dec 18, 2024
f5372bd
feat: added post
engnadeau Dec 18, 2024
568af6c
feat: added post
engnadeau Dec 18, 2024
ff90afd
feat: added post
engnadeau Dec 18, 2024
d0bc7e0
fix: cleaned nav
engnadeau Dec 18, 2024
2e1922e
feat: added youtube recording and updated featured image
engnadeau Dec 18, 2024
cb59511
refactor: prefixed names with yyyy-mm
engnadeau Dec 18, 2024
833511b
feat: added post
engnadeau Dec 18, 2024
775e862
refactor: moved to subfolder
engnadeau Dec 18, 2024
8aa442a
refactor: fixed paths
engnadeau Dec 18, 2024
263057f
refactor: formatted
engnadeau Dec 18, 2024
52b8e2d
feat: added links
engnadeau Dec 18, 2024
9144c17
docs: added status badge
engnadeau Dec 18, 2024
382dd74
fix: SyntaxError: Unexpected token
engnadeau Dec 18, 2024
2ddf1e3
feat: add footer note with current year
engnadeau Dec 18, 2024
7d196d5
feat: create consulting landing page with hero and call to action wid…
engnadeau Dec 18, 2024
4693851
refactor: remove unused Header import and headerData
engnadeau Dec 18, 2024
4bdcfc9
Create dependabot.yml
engnadeau Dec 18, 2024
af5f537
chore(deps-dev): bump astro-compress from 2.3.3 to 2.3.5
dependabot[bot] Dec 18, 2024
19c55a1
chore(deps): bump astro from 4.16.2 to 4.16.17
dependabot[bot] Dec 18, 2024
0397f7c
Update dependabot.yml
engnadeau Dec 18, 2024
b3798aa
chore(deps-dev): bump tailwindcss from 3.4.13 to 3.4.17
dependabot[bot] Dec 18, 2024
fa7c01e
chore(deps): bump nanoid from 3.3.7 to 3.3.8 in the npm_and_yarn group
dependabot[bot] Dec 18, 2024
f838ba5
Merge branch 'main' into astro-v5
engnadeau Dec 18, 2024
bb85ff2
build: synced packaged lock
engnadeau Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,582 changes: 1,414 additions & 1,168 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@onwidget/astrowind",
"version": "1.0.0-beta.48",
"description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.",
"version": "1.0.0-beta.49",
"description": "AstroWind: A free template using Astro 5.0 and Tailwind CSS. Astro starter theme.",
"type": "module",
"private": true,
"engines": {
Expand All @@ -22,48 +22,48 @@
"fix:prettier": "prettier -w ."
},
"dependencies": {
"@astrojs/rss": "^4.0.8",
"@astrojs/sitemap": "^3.2.0",
"@astrojs/rss": "^4.0.10",
"@astrojs/sitemap": "^3.2.1",
"@astrolib/analytics": "^0.6.1",
"@astrolib/seo": "^1.0.0-beta.8",
"@fontsource-variable/inter": "^5.1.0",
"astro": "^4.16.17",
"astro-embed": "^0.7.4",
"astro-icon": "^1.1.1",
"astro": "^5.0.3",
"astro-embed": "^0.9.0",
"astro-icon": "^1.1.4",
"limax": "4.1.0",
"lodash.merge": "^4.6.2",
"unpic": "^3.18.0"
"unpic": "^3.22.0"
},
"devDependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/mdx": "^3.1.8",
"@astrojs/mdx": "^4.0.1",
"@astrojs/partytown": "^2.1.2",
"@astrojs/tailwind": "5.1.2",
"@eslint/js": "^9.12.0",
"@astrojs/tailwind": "^5.1.3",
"@eslint/js": "^9.16.0",
"@iconify-json/flat-color-icons": "^1.2.0",
"@iconify-json/tabler": "^1.2.5",
"@iconify-json/tabler": "^1.2.10",
"@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.8.1",
"@typescript-eslint/parser": "^8.8.1",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"astro-compress": "2.3.5",
"astro-eslint-parser": "^1.0.3",
"eslint": "^9.12.0",
"eslint-plugin-astro": "^1.2.4",
"globals": "^15.11.0",
"astro-eslint-parser": "^1.1.0",
"eslint": "^9.16.0",
"eslint-plugin-astro": "^1.3.1",
"globals": "^15.13.0",
"js-yaml": "^4.1.0",
"mdast-util-to-string": "^4.0.0",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"reading-time": "^1.5.0",
"sharp": "0.33.5",
"tailwind-merge": "^2.5.3",
"tailwindcss": "^3.4.17",
"typescript": "^5.6.3",
"typescript-eslint": "^8.8.1",
"tailwind-merge": "^2.5.5",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0",
"unist-util-visit": "^5.0.0"
}
}
12 changes: 5 additions & 7 deletions src/components/blog/Tags.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ const { tags, class: className = 'text-sm', title = undefined, isCategory = fals
{
tags && Array.isArray(tags) && (
<>
<>
{title !== undefined && (
<span class="align-super font-normal underline underline-offset-4 decoration-2 dark:text-slate-400">
{title}
</span>
)}
</>
{title !== undefined && (
<span class="align-super font-normal underline underline-offset-4 decoration-2 dark:text-slate-400">
{title}
</span>
)}
<ul class={className}>
{tags.map((tag) => (
<li class="bg-gray-100 dark:bg-slate-700 inline-block mr-2 rtl:mr-0 rtl:ml-2 mb-2 py-0.5 px-2 lowercase font-medium">
Expand Down
2 changes: 2 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { z, defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';

const metadataDefinition = () =>
z
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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">
Expand Down
8 changes: 4 additions & 4 deletions src/utils/blog.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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(),
Expand All @@ -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;

Expand Down
6 changes: 4 additions & 2 deletions src/utils/frontmatter.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import getReadingTime from 'reading-time';
import { toString } from 'mdast-util-to-string';
import { visit } from 'unist-util-visit';
import type { MarkdownAstroData, RehypePlugin, RemarkPlugin } from '@astrojs/markdown-remark';
import type { RehypePlugin, RemarkPlugin } from '@astrojs/markdown-remark';

export const readingTimeRemarkPlugin: RemarkPlugin = () => {
return function (tree, file) {
const textOnPage = toString(tree);
const readingTime = Math.ceil(getReadingTime(textOnPage).minutes);

(file.data.astro as MarkdownAstroData).frontmatter.readingTime = readingTime;
if (typeof file?.data?.astro?.frontmatter !== 'undefined') {
file.data.astro.frontmatter.readingTime = readingTime;
}
};
};

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"~/*": ["src/*"]
}
},
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist/"]
}
Loading