From 12229227bfacc94c2b9b0c69e877beac98ecb95a Mon Sep 17 00:00:00 2001 From: 100gle Date: Mon, 11 Sep 2023 14:57:22 +0800 Subject: [PATCH] i18n(zh-cn): update `core-concepts/astro-pages.mdx` --- src/content/docs/zh-cn/core-concepts/astro-pages.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/content/docs/zh-cn/core-concepts/astro-pages.mdx b/src/content/docs/zh-cn/core-concepts/astro-pages.mdx index ce26bc9897ee2..d6d7f644a6a8d 100644 --- a/src/content/docs/zh-cn/core-concepts/astro-pages.mdx +++ b/src/content/docs/zh-cn/core-concepts/astro-pages.mdx @@ -24,7 +24,13 @@ Astro 使用一种名为 **基于文件的路由** 的路由策略。`src/pages/ ### 页面之间的链接 -在你的 Astro 页面中,使用标准的 HTML [`` 元素](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/a)来链接到网站上的其他页面。 +在你的 Astro 页面中,使用标准的 HTML [`` 元素](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/a)来链接到网站上的其他页面。这需要使用 **相对于根域名的 URL 路径** 作为你的链接,而不是相对文件路径。 + +例如,要从 `example.com` 上的任何其他页面链接到 `https://example.com/authors/sonali/`,你可以像这样: + +```astro title="src/pages/index.astro" +阅读更多 关于 Sonali 的信息。 +``` ## Astro 页面 @@ -68,7 +74,7 @@ Astro 还将 `src/pages/` 目录中的任何 Markdown (`.md`) 文件视为网站 ```md {3} --- -# 举例: src/pages/page.md +# 举例:src/pages/page.md layout: '../layouts/MySiteLayout.astro' title: '我的 Markdown 页面' ---