Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal template #1090

Merged
merged 3 commits into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions examples/minimal/.gitignore
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions examples/minimal/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## force pnpm to hoist
shamefully-hoist = true
34 changes: 34 additions & 0 deletions examples/minimal/README.md
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions examples/minimal/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
renderers: [],
}
12 changes: 12 additions & 0 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions examples/minimal/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /
15 changes: 15 additions & 0 deletions examples/minimal/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
---
natemoo-re marked this conversation as resolved.
Show resolved Hide resolved
<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>
5 changes: 5 additions & 0 deletions packages/create-astro/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ export const TEMPLATES = [
value: 'portfolio',
renderers: ['@astrojs/renderer-preact'],
},
{
title: 'Minimal',
value: 'minimal',
renderers: [],
},
];