This repository is desiged for a daylong workshop on Astro. It's called "Astro for Rank Beginners" because it basically assumes that you know very little about how Astro works. Each step in the repository is a building block on the previous step, an each step covers a specific aspect of Astro.
At the end, a student should have a basic idea how Astro sites are built.
This repository is designed as a tutorial about Astro. Each step -- and there are currently 20 -- is branched from the previous one and builds on what is there. So, for example, Step 3 illustrates the use of the <slot>
element, and then Step 4 branches from Step 3 and uses everything in the previous Steps while adding new code.
- Since a change in one step will need to be included in all subsequent steps, there is a file in each branch called
mergebranches.sh
that migrates code from step to step.
- Review the structure of an empty Astro application
- Discuss purpose and structure of each file that was created
- Show page-based routing
- Be sure to point out directories are paths
- Basic component structure
- Basic use of props
- Explain destructuring
- Components using the
<slot>
tag
- Integrating a layout
- Build a menu
- Show how components can be embedded in components
*Adding styles to components and the site
- Display markdown content as a page
- Add a blog section via content collections
- Add a blog post summary page
- Add a Sitemap integtration
npm install @astrojs/sitemap
- Adding logging middleware
- Adding View Transitions
- Add a basic contact form
- Use Astro Actions to gather form data
- Use node adapter
npx astro add node
- Write contact information to AstroDB
npx astro add db
- Astro Client Islands
- Add newsletter signup component to bottom of all blogs
- Integrate React
npx astro add react
- Add quotes from a Quote API
- Run express-quotes-api project
- https://github.com/NickHodges/express-quotes-api
- Choose random quote and build page for each quote via dynamic routing
- Add a server island
- It's an avatar that delay loads
- It doesn't hold up the page
- It renders on the server, despite being "customized"
- It's an avatar that delay loads
- Integrate MDX into application
npx astro add mdx
- Use
client:visible
- Show the Astro
<Image>
tag- Note how it converts and sizes images for efficiency
- Use pagination with the blog
- Add 15 more posts, page them 4 at a time