搜尋全站文章

沒有找到相關文章

試試其他關鍵字或檢查拼寫

找到 0 篇文章 • 包含部落格、筆記、旅遊文章

Medium GitHub LinkedIn

【Astro】環境建置與基本使用

作者頭像
Sam

2025年7月1日

5分鐘閱讀

【Astro】環境建置與基本使用

【Astro】環境建置與基本使用

架構

1. Routing 路徑介紹

Astro 路徑與 Next.js 一樣,是基於 file based routing,因此可以很方便的進行路徑管理。

| |-components |-content |-layouts |-pages |-public |-src |-.astro |-.env |-.env.local |-.env.development.local
  • 404.astro: 404 頁面
  • index.astro: 首頁
  • about.astro: 關於頁面
  • contact.astro: 聯絡頁面
  • posts/[slug].astro: 文章頁面
  • posts/[slug]/index.astro: 文章頁面
  • posts/[slug]/index.astro: 文章頁面

探索更多精彩內容

繼續閱讀,了解更多技術與個人經歷的精彩文章。