Skip to content

Commit 1248438

Browse files
committed
feat: initial commit
(cherry picked from commit 44c4d7b9521fe449e61edc614446195861932f8c)
1 parent 02b0a65 commit 1248438

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+13083
-0
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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
22+
23+
.vercel

README.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
14+
15+
## 🚀 Project Structure
16+
17+
Inside of your Astro project, you'll see the following folders and files:
18+
19+
```
20+
/
21+
├── public/
22+
│ └── favicon.svg
23+
├── src/
24+
│ ├── components/
25+
│ │ └── Card.astro
26+
│ ├── layouts/
27+
│ │ └── Layout.astro
28+
│ └── pages/
29+
│ └── index.astro
30+
└── package.json
31+
```
32+
33+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
34+
35+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
36+
37+
Any static assets, like images, can be placed in the `public/` directory.
38+
39+
## 🧞 Commands
40+
41+
All commands are run from the root of the project, from a terminal:
42+
43+
| Command | Action |
44+
| :------------------------ | :----------------------------------------------- |
45+
| `npm install` | Installs dependencies |
46+
| `npm run dev` | Starts local dev server at `localhost:3000` |
47+
| `npm run build` | Build your production site to `./dist/` |
48+
| `npm run preview` | Preview your build locally, before deploying |
49+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
50+
| `npm run astro -- --help` | Get help using the Astro CLI |
51+
52+
## 👀 Want to learn more?
53+
54+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

astro.config.mjs

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { defineConfig } from 'astro/config';
2+
import yaml from '@rollup/plugin-yaml';
3+
import icon from "astro-icon";
4+
5+
import tailwind from "@astrojs/tailwind";
6+
import {remarkReadingTime} from "./src/plugins/remark-reading-time.mjs";
7+
8+
import Color from 'colorjs.io';
9+
10+
// https://astro.build/config
11+
12+
13+
const oklchToHex = function (str) {
14+
const DEFAULT_HUE = 250;
15+
const regex = /-?\d+(\.\d+)?/g;
16+
const matches = str.string.match(regex);
17+
const lch = [matches[0], matches[1], DEFAULT_HUE];
18+
return new Color("oklch", lch).to("srgb").toString({format: "hex"});
19+
}
20+
21+
export default defineConfig({
22+
integrations: [
23+
tailwind(),
24+
icon({
25+
include: {
26+
'material-symbols': ['*'],
27+
'fa6-brands': ['*']
28+
}
29+
})
30+
],
31+
markdown: {
32+
remarkPlugins: [remarkReadingTime],
33+
},
34+
redirects: {
35+
'/': '/page/1',
36+
},
37+
vite: {
38+
plugins: [yaml()],
39+
css: {
40+
preprocessorOptions: {
41+
stylus: {
42+
define: {
43+
oklchToHex: oklchToHex
44+
}
45+
}
46+
}
47+
}
48+
},
49+
});

0 commit comments

Comments
 (0)