diff --git a/astro.config.mjs b/astro.config.mjs index a4b00ac..ae99435 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,10 +2,10 @@ import { defineConfig, passthroughImageService } from 'astro/config'; import mdx from '@astrojs/mdx'; import sitemap from '@astrojs/sitemap'; -import tailwind from '@astrojs/tailwind'; +import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ - site: 'https://deep-thinking.top', + site: 'https://coredive.dev', integrations: [mdx(), sitemap( { i18n: { @@ -13,7 +13,7 @@ export default defineConfig({ locales: {zh:'zh-CN', en:'en-US'}, }, } - ), tailwind()], + )], i18n: { defaultLocale: 'zh', locales: ['zh', 'en'], @@ -21,8 +21,7 @@ export default defineConfig({ image: { service: passthroughImageService(), }, - experimental:{ - svg: true - } -}, -); \ No newline at end of file + vite: { + plugins: [tailwindcss()], + }, +},); \ No newline at end of file diff --git a/package.json b/package.json index b3802ce..da9d036 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,19 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.0", - "@astrojs/rss": "^4.0.9", - "@astrojs/sitemap": "^3.2.1", - "@astrojs/tailwind": "^5.1.3", - "astro": "^5.0.0", - "firebase": "^11.0.2", - "tailwindcss": "^3.4.16" + "@astrojs/check": "0.9.4", + "@astrojs/mdx": "4.3.4", + "@astrojs/rss": "4.0.12", + "@astrojs/sitemap": "3.5.1", + "@astrojs/tailwind": "6.0.2", + "@tailwindcss/vite": "4.1.12", + "astro": "5.13.5", + "firebase": "12.2.1", + "tailwindcss": "4.1.12", + "typescript": "5.9.2" }, "devDependencies": { - "@tailwindcss/typography": "^0.5.15" + "@tailwindcss/typography": "0.5.16", + "wrangler": "4.33.2" } } \ No newline at end of file diff --git a/src/components/StructData.astro b/src/components/StructData.astro index 89c0bd6..7c2ba05 100644 --- a/src/components/StructData.astro +++ b/src/components/StructData.astro @@ -12,7 +12,7 @@ const isoDate = new Date(publishDate).toISOString(); "author": { "@type": "Person", "name": "低头沉思", - "url": "https://deep-thinking.top/zh/about/" + "url": "https://coredive.dev/zh/about/" } } ` @@ -22,7 +22,7 @@ const isoDate = new Date(publishDate).toISOString(); "@type": "Person", "name": "低头沉思", "jobTitle": "Android工程师", - "url": "https://deep-thinking.top/zh/about/", + "url": "https://coredive.dev/zh/about/", "sameAs": ["https://github.com/hongui"] }` }else if(category==='home'){ @@ -30,7 +30,7 @@ const isoDate = new Date(publishDate).toISOString(); "@context": "https://schema.org", "@type": "WebSite", "name": "低头沉思", - "url": "https://deep-thinking.top/" + "url": "https://coredive.dev/" }` } --- diff --git a/src/content/about/index.en.mdx b/src/content/about/index.en.mdx index 31f8cd0..febd6b8 100644 --- a/src/content/about/index.en.mdx +++ b/src/content/about/index.en.mdx @@ -1,6 +1,6 @@ --- title: "About me" -description: "about deep thinking" +description: "about coredivedev" date: 2022-07-26T23:35:00+08:00 --- @@ -9,7 +9,7 @@ import Wechat from "../../assets/wechat.svg"; import Email from "../../assets/email.svg"; import Contact from "../../components/Contact.astro"; -# Deep thinking +# CoreDiveDev ## Profile Love programming, love being alone ## Technology Stacks diff --git a/src/content/posts/everything-you-need-to-know-to-migrate-from-hugo-to-astro/index.md b/src/content/posts/everything-you-need-to-know-to-migrate-from-hugo-to-astro/index.md index 8487839..0f7392d 100644 --- a/src/content/posts/everything-you-need-to-know-to-migrate-from-hugo-to-astro/index.md +++ b/src/content/posts/everything-you-need-to-know-to-migrate-from-hugo-to-astro/index.md @@ -219,8 +219,8 @@ return Astro.rewrite("/zh") ```typescript export const ui = { en: { - 'title': 'Deep thinking home page', - 'description': 'A home page for deep thinking,share some articles about Android,OpenGLES,Python,HTML/CSS etc.' + 'title': 'CoreDiveDev home page', + 'description': 'A home page for CoreDiveDev,share some articles about Android,OpenGLES,Python,HTML/CSS etc.' }, zh: { 'title': '低头沉思博客主页', @@ -351,7 +351,7 @@ export async function getStaticPaths({ paginate }) { 这里的关键点是提供`posts`的同时,提供`params`,不然会出现`Missing parameter: lng`的错误。 ## 总结 从Hugo迁移到Astro总体来说是比较简单的,但是迁移过程需要按照一定的流程和方法进行,抓大放小,可以大大增强自信心,保证迁移成功。在迁移过程中,首先需要关注的是内容,所以要先将内容导入成功,导入的过程需要接触到路由和页面相关的知识,可以多去官网看看这两部分的内容。其次是个性化的过程中,要首先搞清楚自己的需求,选择合适的工具,做好规划,不然个性化进行到一半,发现有些需求不好实现,推倒重来的代价就比较大了,这部分我推荐使用`Tailwind CSS`。 -如果你有看得不明白的地方,欢迎到 https://github.com/hongui/hongui.github.io 查看我对应的源码。我尽可能地减少了封装,保证了代码的纯粹度。也欢迎大家去我的博客网站 (https://deep-thinking.top/) 上看看实际的显示效果。 +如果你有看得不明白的地方,欢迎到 https://github.com/hongui/hongui.github.io 查看我对应的源码。我尽可能地减少了封装,保证了代码的纯粹度。也欢迎大家去我的博客网站 (https://coredive.dev/) 上看看实际的显示效果。 ## 参考 1. [Astro](https://docs.astro.build/) diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 3cf264f..b008953 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -9,9 +9,9 @@ export const defaultLanguage = 'zh'; export const ui = { en: { - 'title': 'Deep thinking home page', - 'description': 'A home page for deep thinking,share some articles about Android,OpenGLES,Python,HTML/CSS etc.', - 'website': 'Deep thinking', + 'title': 'CoreDiveDev home page', + 'description': 'A home page for CoreDiveDev,share some articles about Android,OpenGLES,Python,HTML/CSS etc.', + 'website': 'CoreDiveDev', 'welcome': 'Welcome to my website', 'last_updates': 'Latest updates', 'load_more': 'Load more', @@ -24,7 +24,7 @@ export const ui = { 'tags.title': 'Total Tags', 'tags.description': 'The tags of posts', 'about.title': 'About me', - 'about.description': 'About me,my(Deep thinking) personal resume' + 'about.description': 'About me,my(CoreDiveDev) personal resume' }, zh: { 'title': '低头沉思博客主页', diff --git a/src/styles/global.css b/src/styles/global.css index 8ea77ff..bfc82e9 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -3,9 +3,7 @@ https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md */ - @tailwind base; - @tailwind components; - @tailwind utilities; + @reference "tailwindcss"; @layer base { :root { diff --git a/wrangler.toml b/wrangler.toml index 5dc11e6..7dc2cfc 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,7 +1,10 @@ -name = "blogs" -compatibility_date = "2024-07-29" +name = "blog" +compatibility_date = "2025-04-01" compatibility_flags = ["nodejs_compat"] -pages_build_output_dir = "./dist" + +[assets] +directory = "./dist/" +not_found_handling = "404-page" [vars] NODE_VERSION = "20.0.0"