mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
0a7b6deaec
* feat: ♻️ updating hydration to work with the directive syntax * test: ✅ Updating tests for the hydration directive syntax * refactor: Updating example projects for the hydration directive syntax * test: ✅ Found a test fixture still needing an update to the hydration directive syntax * style: Prettier strikes again! Reverting code formatting changes * refactor: ♻️ moving directive matching to a Set * refactor: Updating syntax to `client:load` * refactor: ♻️ Simplifying the `client:` directive match Per PR feedback from @matthewp * chore: errant console.warn() snuck into the last commit * feat: 🔊 Adding a super fancy build warning to update to the directive syntax * refactor: ♻️ Removing unnecessary checks when matching supported hydration directives `val` isn't being used for now, but leaving it in the attr destructuring as a reminder since it'll be needed for `client:media` * test: ✅ Including the original hydration syntax in a test to make sure it builds * style: 📝 Adding a comment to make it clear why the old hydration syntax is included in a the test markup * fix: 🐛 updating `head` logic to recognize hydration directive syntax * docs: Adding changeset * refactor: 🔥 Removing unnecessary `!hasComponents` check * docs: 📝 Adding more detail to the changset Co-authored-by: Tony Sullivan <tony.f.sullivan@gmail.com> |
||
---|---|---|
.. | ||
public | ||
src | ||
.gitignore | ||
.npmrc | ||
astro.config.mjs | ||
package.json | ||
README.md |
Astro Starter Kit: Blog
npm init astro --template blog
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
Features:
- ✅ SEO-friendly setup with canonical URLs and OpenGraph data
- ✅ Full Markdown support
- ✅ RSS 2.0 generation
- ✅ Sitemap.xml generation
🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ ├── robots.txt
│ └── favicon.ico
├── src/
│ ├── components/
│ │ └── Tour.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.
🧞 Commands
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run start |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
👀 Want to learn more?
Feel free to check our documentation or jump into our Discord server.