Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 7 additions & 8 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
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: {
defaultLocale: 'zh',
locales: {zh:'zh-CN', en:'en-US'},
},
}
), tailwind()],
)],
i18n: {
defaultLocale: 'zh',
locales: ['zh', 'en'],
},
image: {
service: passthroughImageService(),
},
experimental:{
svg: true
}
},
);
vite: {
plugins: [tailwindcss()],
},
},);
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions src/components/StructData.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
}
`
Expand All @@ -22,15 +22,15 @@ 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'){
content=`{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "低头沉思",
"url": "https://deep-thinking.top/"
"url": "https://coredive.dev/"
}`
}
---
Expand Down
4 changes: 2 additions & 2 deletions src/content/about/index.en.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "About me"
description: "about deep thinking"
description: "about coredivedev"

date: 2022-07-26T23:35:00+08:00
---
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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': '低头沉思博客主页',
Expand Down Expand Up @@ -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/)
Expand Down
8 changes: 4 additions & 4 deletions src/i18n/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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': '低头沉思博客主页',
Expand Down
4 changes: 1 addition & 3 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 6 additions & 3 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down