Add minimal template (#1090)
This commit is contained in:
parent
072dabe832
commit
d68ac85e7f
8 changed files with 91 additions and 0 deletions
18
examples/minimal/.gitignore
vendored
Normal file
18
examples/minimal/.gitignore
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# build output
|
||||
dist
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
.snowpack/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
2
examples/minimal/.npmrc
Normal file
2
examples/minimal/.npmrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
## force pnpm to hoist
|
||||
shamefully-hoist = true
|
34
examples/minimal/README.md
Normal file
34
examples/minimal/README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# [Astro](https://astro.build)
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```
|
||||
/
|
||||
├── public/
|
||||
│ ├── robots.txt
|
||||
│ └── favicon.ico
|
||||
├── src/
|
||||
│ └── 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 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](https://github.com/snowpackjs/astro) or jump into our [Discord server](https://astro.build/chat).
|
3
examples/minimal/astro.config.mjs
Normal file
3
examples/minimal/astro.config.mjs
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default {
|
||||
renderers: [],
|
||||
}
|
12
examples/minimal/package.json
Normal file
12
examples/minimal/package.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "@example/minimal",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "astro dev",
|
||||
"build": "astro build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"astro": "^0.18.12"
|
||||
}
|
||||
}
|
2
examples/minimal/public/robots.txt
Normal file
2
examples/minimal/public/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow: /
|
15
examples/minimal/src/pages/index.astro
Normal file
15
examples/minimal/src/pages/index.astro
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
---
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Welcome to Astro</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -19,4 +19,9 @@ export const TEMPLATES = [
|
|||
value: 'portfolio',
|
||||
renderers: ['@astrojs/renderer-preact'],
|
||||
},
|
||||
{
|
||||
title: 'Minimal',
|
||||
value: 'minimal',
|
||||
renderers: [],
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue