diff --git a/packages/astro-docs-starter/src/config.ts b/packages/astro-docs-starter/src/config.ts index 174765d..0d06b6c 100644 --- a/packages/astro-docs-starter/src/config.ts +++ b/packages/astro-docs-starter/src/config.ts @@ -1,19 +1,22 @@ export const SITE = { - title: 'Your Documentation Website', - description: 'Your website description.', - defaultLanguage: 'en_US', + title: 'Your Documentation Website', + description: 'Your website description.', + defaultLanguage: 'en_US', }; export const OPEN_GRAPH = { - image: { - src: 'https://github.com/withastro/astro/blob/main/assets/social/banner.jpg?raw=true', - alt: 'astro logo on a starry expanse of space,' + ' with a purple saturn-like planet floating in the right foreground', - }, - twitter: 'astrodotbuild', + image: { + src: 'https://github.com/withastro/astro/blob/main/assets/social/banner.jpg?raw=true', + alt: + 'astro logo on a starry expanse of space,' + + ' with a purple saturn-like planet floating in the right foreground', + }, + twitter: 'astrodotbuild', }; export const KNOWN_LANGUAGES = { - English: 'en', + English: 'en', + 简体中文: 'zh', }; // Uncomment this to add an "Edit this page" button to every page of documentation. @@ -31,14 +34,24 @@ export const KNOWN_LANGUAGES = { // } export const SIDEBAR = { - en: [ - { text: '', header: true }, - { text: 'Section Header', header: true }, - { text: 'Introduction', link: 'en/introduction' }, - { text: 'Page 2', link: 'en/page-2' }, - { text: 'Page 3', link: 'en/page-3' }, - - { text: 'Another Section', header: true }, - { text: 'Page 4', link: 'en/page-4' }, - ], + en: [ + { text: 'English', header: true }, + { text: 'Section Header', header: true }, + { text: 'Introduction', link: 'contents/introduction' }, + { text: 'Page 2', link: 'contents/page-2' }, + { text: 'Page 3', link: 'contents/page-3' }, + + { text: 'Another Section', header: true }, + { text: 'Page 4', link: 'contents/page-4' }, + ], + zh: [ + { text: '简体中文', header: true }, + { text: 'Section Header', header: true }, + { text: 'Introduction', link: 'contents/introduction' }, + { text: 'Page 2', link: 'contents/page-2' }, + { text: 'Page 3', link: 'contents/page-3' }, + + { text: 'Another Section', header: true }, + { text: 'Page 4', link: 'contents/page-4' }, + ], }; diff --git a/packages/astro-docs-starter/src/pages/zh/introduction.md b/packages/astro-docs-starter/src/pages/zh/introduction.md new file mode 100644 index 0000000..af9249a --- /dev/null +++ b/packages/astro-docs-starter/src/pages/zh/introduction.md @@ -0,0 +1,26 @@ +--- +title: Introduction +description: Docs intro +layout: ../../layouts/MainLayout.astro +--- + +**Welcome to Astro!** + +This is the `docs` starter template. It contains all of the features that you need to build a Markdown-powered documentation site, including: + +- ✅ **Full Markdown support** +- ✅ **Responsive mobile-friendly design** +- ✅ **Sidebar navigation** +- ✅ **Search (powered by Algolia)** +- ✅ **Multi-language i18n** +- ✅ **Automatic table of contents** +- ✅ **Automatic list of contributors** +- ✅ (and, best of all) **dark mode** + +## Getting Started + +To get started with this theme, check out the `README.md` in your new project directory. It provides documentation on how to use and customize this template for your own project. Keep the README around so that you can always refer back to it as you build. + +Found a missing feature that you can't live without? Please suggest it on Discord [(#ideas-and-suggestions channel)](https://astro.build/chat) and even consider adding it yourself on GitHub! Astro is an open source project and contributions from developers like you are how we grow! + +Good luck out there, Astronaut. 🧑‍🚀 diff --git a/packages/astro-docs-starter/src/pages/zh/page-2.md b/packages/astro-docs-starter/src/pages/zh/page-2.md new file mode 100644 index 0000000..84ffea9 --- /dev/null +++ b/packages/astro-docs-starter/src/pages/zh/page-2.md @@ -0,0 +1,51 @@ +--- +title: Page 2 +description: Lorem ipsum dolor sit amet - 2 +layout: ../../layouts/MainLayout.astro +--- + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +Sed flavum. Stridore nato, Alcandrumque desint ostendit derat, longoque, eadem +iunxit miserum pedum pectora. Liberat sine pignus cupit, ferit mihi venias +amores, et quod, maduere haec _gravi_ contentusque heros. Qui suae attonitas. + +_Acta caelo_ ego, hoc illi ferroque, qui fluitque Achillis deiecerat erat +inhospita arasque ad sume et aquis summo. Fugerat ipse iam. Funeris Iuno Danaos +est inroravere aurum foret nati aeque tetigisset! Esse ad tibi queritur [Sol sub +est](http://iusserat.net/) pugno solitoque movet coercuit solent caput te? + +Crescit sint petit gemellos gemino, et _gemma deus sub_ Surrentino frena +principiis statione. Soporiferam secunda nulli Tereus is _Aeolidae cepit_, tua +peregrinosque illam parvis, deerit sub et times sedant. + +## Apium haec candida mea movebo obsuntque descendat + +Furti lucos cum iussa quid temptanti gravitate animus: vocat +[ira](http://rediere.com/): illa. Primis aeternus, illi cinguntur ad mugitus +aevo repentinos nec. + +Transcurrere tenens in _litore_ tuti plebe circumspicit viventi quoque mox +troades medio mea locuta gradus perque sic unguibus +[gramen](http://quantoque.io/). Effetus celerique nomina quoque. Ire gemino est. +Eurus quaerenti: et lacus, tibi ignorant tertia omnes subscribi ducentem sedit +experientia sine ludunt multae. Ponderis memor purasque, ut armenta corpora +efferre: praeterea infantem in virgam verso. + +- Revellit quoniam vulnerat dique respicit +- Modo illis +- Nec victoria quodque +- Spectans si vitis iussorum corpora quas + +Tibi igni, iamque, sum arsuro patet et Talibus cecidere: levati Atlas villosa +dubium conparentis litem volentem nec? Iuga tenent, passi cumque generosior +luminis, quique mea aequora ingens bracchia furor, respiramen eram: in. Caelebs +et passu Phaethonta alumna orbem rapuit inplet [adfusaeque +oculis](http://www.virum.net/ille-miserae.html) paene. Casus mea cingebant idque +suis nymphe ut arae potuit et non, inmota erat foret, facta manu arvum. + +Fugam nec stridentemque undis te solet mentemque Phrygibus fulvae adhuc quam +cernimus est! Aper iube dederat adsere iamque mortale ita cornua si fundamina +quem caperet, iubeas stolidae pedesque intrarunt navigat triformis. Undas terque +digitos satis in nautae sternuntur curam, iaculum ignoscere _pianda dominique +nostra_ vivacemque teneraque! diff --git a/packages/astro-docs-starter/src/pages/zh/page-3.md b/packages/astro-docs-starter/src/pages/zh/page-3.md new file mode 100644 index 0000000..6d590f1 --- /dev/null +++ b/packages/astro-docs-starter/src/pages/zh/page-3.md @@ -0,0 +1,37 @@ +--- +title: Page 3 +description: Lorem ipsum dolor sit amet - 3 +layout: ../../layouts/MainLayout.astro +--- + +This is a fully-featured page, written in Markdown! + +## Section A + +Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. + +## Section B + +Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. + +## Section C + +```markdown +--- +title: Markdown Page! +lang: en +layout: ~/layouts/MainLayout.astro +--- + +# Markdown example + +This is a fully-featured page, written in Markdown! + +## Section A + +Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. + +## Section B + +Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. +``` diff --git a/packages/astro-docs-starter/src/pages/zh/page-4.md b/packages/astro-docs-starter/src/pages/zh/page-4.md new file mode 100644 index 0000000..85416ff --- /dev/null +++ b/packages/astro-docs-starter/src/pages/zh/page-4.md @@ -0,0 +1,37 @@ +--- +title: Page 4 +description: Lorem ipsum dolor sit amet - 4 +layout: ../../layouts/MainLayout.astro +--- + +This is a fully-featured page, written in Markdown! + +## Section A + +Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. + +## Section B + +Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. + +## Section C + +```markdown +--- +title: Markdown Page! +lang: en +layout: ~/layouts/MainLayout.astro +--- + +# Markdown example + +This is a fully-featured page, written in Markdown! + +## Section A + +Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. + +## Section B + +Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. +```