diff options
Diffstat (limited to '')
-rw-r--r-- | examples/blog/.gitignore (renamed from packages/create-astro/src/templates/blog/_gitignore) | 0 | ||||
-rw-r--r-- | examples/blog/README.md | 41 | ||||
-rw-r--r-- | examples/blog/astro.config.mjs | 16 | ||||
-rw-r--r-- | examples/blog/meta.json (renamed from packages/create-astro/src/templates/blog/meta.json) | 0 | ||||
-rw-r--r-- | examples/blog/package.json | 5 | ||||
-rw-r--r-- | examples/blog/public/favicon.svg (renamed from examples/doc/public/favicon.svg) | 0 |
6 files changed, 41 insertions, 21 deletions
diff --git a/packages/create-astro/src/templates/blog/_gitignore b/examples/blog/.gitignore index d436c6dad..d436c6dad 100644 --- a/packages/create-astro/src/templates/blog/_gitignore +++ b/examples/blog/.gitignore diff --git a/examples/blog/README.md b/examples/blog/README.md index 2a20654f2..87c48761c 100644 --- a/examples/blog/README.md +++ b/examples/blog/README.md @@ -1,5 +1,7 @@ # Astro Blog Example +> π§βπ **Seasoned astronaut?** Delete this file. Have fun! + Features: - β
SEO-friendly setup with canonical URLs and OpenGraph data @@ -7,24 +9,39 @@ Features: - β
RSS 2.0 generation - β
Sitemap.xml generation -## Setup +## π Project Structure + +Inside of your Astro project, you'll see the following folders and files: ``` -yarn +/ +βββ public/ +β βββ robots.txt +β βββ favicon.ico +βββ src/ +β βββ components/ +β β βββ Tour.astro +β βββ pages/ +β βββ index.astro +βββ package.json ``` -## Dev +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. -``` -yarn start -``` +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. -Preview at `http://localhost:3000` +Any static assets, like images, can be placed in the `public/` directory. -## Build +## π§ Commands -``` -yarn build -``` +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? -Will output static site at `./dist` +Feel free to check [our documentation](https://github.com/snowpackjs/astro) or jump into our [Discord server](https://discord.gg/EsGdSGen). diff --git a/examples/blog/astro.config.mjs b/examples/blog/astro.config.mjs index 9933e9571..c7583a774 100644 --- a/examples/blog/astro.config.mjs +++ b/examples/blog/astro.config.mjs @@ -1,10 +1,14 @@ export default { - projectRoot: '.', - pages: './src/pages', - public: './public', - dist: './dist', + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that donβt need processing. buildOptions: { - sitemap: true, - site: 'https://mysite.dev/', // change + // site: '', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' }, }; diff --git a/packages/create-astro/src/templates/blog/meta.json b/examples/blog/meta.json index caa6852e5..caa6852e5 100644 --- a/packages/create-astro/src/templates/blog/meta.json +++ b/examples/blog/meta.json diff --git a/examples/blog/package.json b/examples/blog/package.json index 5d8d17115..c6faac56a 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -1,11 +1,10 @@ { - "name": "@example/blog", + "name": "@astrojs/example-blog", "version": "0.0.1", "private": true, "scripts": { "start": "astro dev", - "build": "astro build", - "astro-dev": "nodemon --delay 0.5 -w ../../packages/astro/dist -x '../../packages/astro/astro.mjs dev'" + "build": "astro build" }, "devDependencies": { "astro": "^0.12.9", diff --git a/examples/doc/public/favicon.svg b/examples/blog/public/favicon.svg index 542f90aec..542f90aec 100644 --- a/examples/doc/public/favicon.svg +++ b/examples/blog/public/favicon.svg |