Skip to content

i18n(zh-cn): Update from-gatsby.mdx #10808

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

Merged
merged 5 commits into from
Feb 6, 2025
Merged
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
40 changes: 30 additions & 10 deletions src/content/docs/zh-cn/guides/migrate-to-astro/from-gatsby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stub: false
framework: Gatsby
i18nReady: true
---
import { Steps } from '@astrojs/starlight/components';
import { Steps, LinkCard, CardGrid } from '@astrojs/starlight/components';
import AstroJSXTabs from '~/components/tabs/AstroJSXTabs.astro';
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';

Expand Down Expand Up @@ -314,7 +314,7 @@ export default function MyComponent(props) {
<div style="background-color: #f4f4f4; padding: 1em;">{message}</div>
```

在安装了 [Tailwind 集成](/zh-cn/guides/integrations-guide/tailwind/) 后支持 Tailwind。不需要对现有的 Tailwind 代码进行任何更改!
在安装了 [Tailwind Vite 插件](/zh-cn/guides/styling/#tailwind) 后支持 Tailwind。不需要对现有的 Tailwind 代码进行任何更改!

Gatsby 中使用 `gatsby-browser.js` 中的 CSS 导入实现全局样式。在 Astro 中,你将直接导入 `.css` 文件到主布局组件中以实现全局样式。

Expand Down Expand Up @@ -565,22 +565,42 @@ export const pageQuery = graphql`
</Steps>

## 社区资源
<CardGrid>

- 博客帖子:[从 Gatsby 迁移到 Astro](https://loige.co/migrating-from-gatsby-to-astro/)
<LinkCard title="从 Gatsby 迁移到 Astro" href="https://loige.co/migrating-from-gatsby-to-astro/"
description="我是如何以及为什么将博客从 Gatsby 迁移到 Astro 的,以及我在这个过程中学到了什么。" />

- 博客帖子:[迁移到 Astro 是多么的简单](https://joelhooks.com/migrating-to-astro-was-ez)。
<LinkCard title="迁移到 Astro 是多么的简单" href="https://joelhooks.com/migrating-to-astro-was-ez"
description="关于从 Gatsby 迁移到 Astro 的过程,以及我选择 Astro 的原因。" />

- 博客帖子:[我为什么从 Gatsby 切换到 Astro](https://www.joshfinnie.com/blog/my-switch-from-gatsby-to-astro/)。
<LinkCard title="我为什么从 Gatsby 切换到 Astro" href="https://www.joshfinnie.com/blog/my-switch-from-gatsby-to-astro/"
description="切换到 Astro 绝对值得写一篇博客!它正在革新静态 Web 开发的前景,使其变得更好。"/>

- 博客帖子:[我为什么从 Gatsby 迁移到 Astro](https://dev.to/askrodney/why-i-moved-to-astro-from-gatsby-3fck)。
<LinkCard title="我为什么从 Gatsby 迁移到 Astro" href="https://dev.to/askrodney/why-i-moved-to-astro-from-gatsby-3fck"
description="快速浏览一下我想迁移的原因,以及为什么 Astro 如此合适。" />

- 博客帖子:[我如何将我的网站从 Gatsby 迁移到 Astro](https://dev.to/flashblaze/migrating-my-website-from-gatsby-to-astro-2ej5)。
<LinkCard title="再次迁移:从 Gatsby 到 Astro" href="https://logarithmicspirals.com/blog/migrating-from-gatsby-to-astro/"
description="了解我是如何将我的个人网站从 Gatsby 过渡到 Astro,同时分享我在迁移过程中的见解和经验。"/>

- 博客帖子:[再次迁移:从 Gatsby 到 Astro](https://logarithmicspirals.com/blog/migrating-from-gatsby-to-astro/)。
<LinkCard title="从 Gatsby 僵局到 Astro 极乐:我的个人网站设计焕新" href="https://jwn.gr/posts/migrating-from-gatsby-to-astro/"
description="Gatsby 已然年迈,但我恰巧发现了一种现代的替代方案。进入 Astro — 为网站注入了新活力的框架。"/>

- 博客帖子:[我为什么以及如何将我的博客从 Gatsby 和 React 迁移到了 Astro 和 Preact](https://www.helmerdavila.com/blog/en/why-and-how-i-moved-my-blog-away-from-gatsby-and-react-to-astro-js-and-preact)
<LinkCard title="我为什么以及如何将我的博客从 Gatsby 和 React 迁移到了 Astro 和 Preact" href="https://www.helmerdavila.com/blog/en/why-and-how-i-moved-my-blog-away-from-gatsby-and-react-to-astro-js-and-preact"
description="与它有关的一切,简单,却强大。" />

- 博客帖子:[我是如何在 Astro 中重写我 100G+ 大小的 Gatsby 网站,并在这个过程中学会并喜欢上它的](https://dunedinsound.com/blog/how_i_rewrote_my_huge_gatsby_site_in_astro_and_learned_to_love_it_in_the_process/)
<LinkCard title="我是如何在 Astro 中重写我超大的 Gatsby 网站,并在这个过程中学着喜欢上它的" href="https://dunedinsound.com/blog/how_i_rewrote_my_huge_gatsby_site_in_astro_and_learned_to_love_it_in_the_process/"
description="一切都变得更快、更愉悦、更高效。"/>

<LinkCard title="我如何从 Gatsby 切换到 Astro(同时保留 Drupal)" href="https://albert.skibinski.nl/en/blog/how-i-switched-gatsby-astro-while-keeping-drupal-mix/"
description="与新版本的 Astro 相遇,而它满足了我的所有需求。"/>

<LinkCard title="我是如何将我的网站从 Gatsby 迁移到 Astro 的" href="https://dev.to/flashblaze/migrating-my-website-from-gatsby-to-astro-2ej5"
description="Astro 已加入群聊。" />

<LinkCard title="Gatsby 到 Astro" href="https://alvin.codes/writing/gatsby-to-astro"
description="我为什么以及如何将这个网站从 Gatsby 迁移到 Astro。"/>

</CardGrid>

:::note[你有资源分享吗?]
如果你找到(或制作)了一个关于将 Gatsby 网站转换为 Astro 的有用的视频或博客文章,[编辑此页面](https://github.com/withastro/docs/edit/main/src/content/docs/en/guides/migrate-to-astro/from-gatsby.mdx)并将其添加到这里!
Expand Down