npm create astro@latest -- --template basics
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/
, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/
directory.
Feel free to check our documentation or jump into our Discord server.
In the project directory, you can run:
The page will reload if you make edits. You will also see any errors in the console.
npm run start
Then open http://localhost:3000 on your preferred browser.
- Run
npm run start:lan
- Open port
3000
on your pc - Figure out what LAN IP your pc is at generally starts with
192.168.x.x
- Open your pc LAN IP on your phone e.g.
http://192.168.1.68:3000/
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
npm run build
Prettier is used as linter. Please install the prettier addon to your preferred editor and ensure that you lint before you save or commit.
Tests using Prettier if the code is styled correctly.
npm run lint:test
Tries to fix any missing spaces or tabs required by Prettier
npm run lint
Motive behind moving to tailwind is to decrease the bundle size of the website Tailwind CSS vs. CSS: An in-depth comparison (speed, file size, etc.)
Flag icons come from: https://flagicons.lipis.dev/ MIT LICENSE
Icons on this website uses https://feathericons.com/ MIT LICENSE