π§βπ Use this template to start your multilanguage site Have fun!
Inside the template, you'll see the following folders and files:
The project has the following structure:
βββ public/
βββ src/ # This directory contains your Astro components and pages.
β βββ assets/
β βββ components/
β β βββ LanguagePicker.astro
β β βββ NavBar.astro
β β βββ NavLink.astro
β βββ content/
β β βββ about/
β β β βββ en/
β β β βββ es/
β β βββ frontPage/
β β βββ en/
β β βββ es/
β β βββ config.ts
β βββ contentSchemas/
β β βββ commonSchemas/
| | βββheadMetaData.js #for the html head
β βββ i18n/
β β βββ ui.ts
β β βββ utils.ts
β βββ icons/
β βββ layouts/
β β βββ Layout.astro
β βββ pageLayouts/
β β βββ AboutPageLayout.astro
β β βββ FrontPageLayout.astro
β βββ pages/
β | βββ about.astro
β | βββ index.astro
β | βββ en/
β | βββ index.astro
β | βββ about.astro
β βββ env.d.ts
βββ tailwind.config.mjs # Tailwind CSS configuration.
βββ tsconfig.json # TypeScript compiler options.
With this template you get:
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add , astro check |
npm run astro -- --help |
Get help using the Astro CLI |
Feel free to check our documentation or jump into our Discord server.