Skip to content

Commit e6eec17

Browse files
committed
Init: Kickstarting a new Astro project
1 parent 9b86ca1 commit e6eec17

File tree

14 files changed

+5954
-1
lines changed

14 files changed

+5954
-1
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.DEFAULT_GOAL := help
2+
3+
.PHONY: help
4+
help: ## Outputs the help
5+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
6+
7+
.PHONY: build
8+
build: ## Compiles the application into static content
9+
npm run build
10+
11+
.PHONY: run
12+
run: ## Starts the development server
13+
npm run dev
14+
15+
.PHONY: clean
16+
clean: ## Deletes the generated content and node_modules
17+
rm -rf ./dist
18+
rm -rf ./node_modules
19+
20+
.PHONY: init
21+
init: ## Installs dependencies
22+
npm install

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,55 @@
1-
# webpage
1+
# Astro Starter Kit: Basics
2+
3+
```
4+
npm create astro@latest -- --template basics
5+
```
6+
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
8+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
9+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
10+
11+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
12+
13+
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png)
14+
15+
16+
## 🚀 Project Structure
17+
18+
Inside of your Astro project, you'll see the following folders and files:
19+
20+
```
21+
/
22+
├── public/
23+
│ └── favicon.svg
24+
├── src/
25+
│ ├── components/
26+
│ │ └── Card.astro
27+
│ ├── layouts/
28+
│ │ └── Layout.astro
29+
│ └── pages/
30+
│ └── index.astro
31+
└── package.json
32+
```
33+
34+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
35+
36+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
37+
38+
Any static assets, like images, can be placed in the `public/` directory.
39+
40+
## 🧞 Commands
41+
42+
All commands are run from the root of the project, from a terminal:
43+
44+
| Command | Action |
45+
| :--------------------- | :----------------------------------------------- |
46+
| `npm install` | Installs dependencies |
47+
| `npm run dev` | Starts local dev server at `localhost:3000` |
48+
| `npm run build` | Build your production site to `./dist/` |
49+
| `npm run preview` | Preview your build locally, before deploying |
50+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
51+
| `npm run astro --help` | Get help using the Astro CLI |
52+
53+
## 👀 Want to learn more?
54+
55+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

astro.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'astro/config';
2+
import tailwind from "@astrojs/tailwind";
3+
import sitemap from "@astrojs/sitemap";
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
site: 'https://sourcectl.dev/',
8+
trailingSlash: 'always',
9+
10+
integrations: [
11+
tailwind(),
12+
sitemap(),
13+
]
14+
});

netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build]
2+
publish = "dist/"
3+
command = "astro build"

0 commit comments

Comments
 (0)