├── .gitignore ├── .npmrc ├── .stackblitzrc ├── README.md ├── astro.config.mjs ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── robots.txt ├── sandbox.config.json └── src ├── components └── BaseHead.astro ├── layouts └── BaseLayout.astro └── pages ├── contact.astro └── index.astro /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist 3 | 4 | # dependencies 5 | node_modules/ 6 | .snowpack/ 7 | 8 | # logs 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # environment variables 14 | .env 15 | .env.production 16 | 17 | # macOS-specific files 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | ## force pnpm to hoist 2 | shamefully-hoist = true 3 | -------------------------------------------------------------------------------- /.stackblitzrc: -------------------------------------------------------------------------------- 1 | { 2 | "startCommand": "npm start", 3 | "env": { 4 | "ENABLE_CJS_IMPORTS": true 5 | } 6 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Astro Crash Course #1 2 | 3 | View the [YouTube Video](https://www.youtube.com/watch?v=cbYr75_R15M) 4 | -------------------------------------------------------------------------------- /astro.config.mjs: -------------------------------------------------------------------------------- 1 | // Full Astro Configuration API Documentation: 2 | // https://docs.astro.build/reference/configuration-reference 3 | 4 | // @type-check enabled! 5 | // VSCode and other TypeScript-enabled text editors will provide auto-completion, 6 | // helpful tooltips, and warnings if your exported object is invalid. 7 | // You can disable this by removing "@ts-check" and `@type` comments below. 8 | 9 | // @ts-check 10 | export default /** @type {import('astro').AstroUserConfig} */ ({ 11 | // Comment out "renderers: []" to enable Astro's default component support. 12 | renderers: [], 13 | }); 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@example/minimal", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview" 10 | }, 11 | "devDependencies": { 12 | "astro": "^0.22.3" 13 | } 14 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treefarmstudio/astro-101/6e57ec2aadba1f719711285ec857ea8cfb427970/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /sandbox.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniteLoopProtection": true, 3 | "hardReloadOnChange": false, 4 | "view": "browser", 5 | "template": "node", 6 | "container": { 7 | "port": 3000, 8 | "startScript": "start", 9 | "node": "14" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/BaseHead.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const {title} = Astro.props; 3 | --- 4 | 5 | 6 | 7 | 8 | {title} -------------------------------------------------------------------------------- /src/layouts/BaseLayout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Component imports and setup JavaScript go here! 3 | import BaseHead from '../components/BaseHead.astro' 4 | const {title} = Astro.props; 5 | --- 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/pages/contact.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Component imports and setup JavaScript go here! 3 | import BaseLayout from '../layouts/BaseLayout.astro' 4 | 5 | const title = "Contact Us!" 6 | --- 7 | 8 | 10 | 11 | 12 |
13 |

{title}

14 |

Hey I'm on the contact page

15 |
16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Component imports and setup JavaScript go here! 3 | import BaseLayout from '../layouts/BaseLayout.astro' 4 | 5 | const title = "Testing Title from fences" 6 | --- 7 | 8 | 15 | 16 | 17 |
18 |

Welcome to Astro

19 |

Hey I'm using a layout

20 |
21 |

Testing another Heading

22 | Contact 23 |
24 | 25 | 26 | 27 | --------------------------------------------------------------------------------