Skip to content

Commit 24121c2

Browse files
committed
Initial commit: Copy of astro-theme-vitesse without history
0 parents  commit 24121c2

62 files changed

Lines changed: 14978 additions & 0 deletions

Some content is hidden

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

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: kaivanwong

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: lts/*
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Lint
27+
run: npm run lint

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: lts/*
21+
22+
- run: npx changelogithub gh release
23+
env:
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dist
2+
node_modules
3+
.astro
4+
.DS_Store
5+
.eslintcache
6+
*.log

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"dbaeumer.vscode-eslint",
5+
"usernamehw.errorlens",
6+
"vue.vscode-typescript-vue-plugin",
7+
"vue.volar",
8+
"antfu.unocss",
9+
"antfu.iconify"
10+
]
11+
}

.vscode/settings.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
// Disable the default formatter, use eslint instead
3+
"prettier.enable": false,
4+
"editor.formatOnSave": false,
5+
6+
// Auto fix
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.eslint": "explicit",
9+
"source.organizeImports": "never"
10+
},
11+
12+
// Silent the stylistic rules in you IDE, but still auto fix them
13+
"eslint.rules.customizations": [
14+
{ "rule": "style/*", "severity": "off", "fixable": true },
15+
{ "rule": "format/*", "severity": "off", "fixable": true },
16+
{ "rule": "*-indent", "severity": "off", "fixable": true },
17+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
18+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
19+
{ "rule": "*-order", "severity": "off", "fixable": true },
20+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
21+
{ "rule": "*-newline", "severity": "off", "fixable": true },
22+
{ "rule": "*quotes", "severity": "off", "fixable": true },
23+
{ "rule": "*semi", "severity": "off", "fixable": true }
24+
],
25+
26+
// Enable eslint for all supported languages
27+
"eslint.validate": [
28+
"javascript",
29+
"javascriptreact",
30+
"typescript",
31+
"typescriptreact",
32+
"vue",
33+
"html",
34+
"markdown",
35+
"json",
36+
"jsonc",
37+
"yaml",
38+
"toml",
39+
"xml",
40+
"gql",
41+
"graphql",
42+
"astro",
43+
"svelte",
44+
"css",
45+
"less",
46+
"scss",
47+
"pcss",
48+
"postcss"
49+
]
50+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Kieran Wang
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Vitesse theme for Astro
2+
3+
A minimal, SEO-friendly portfolio and blog theme for Astro, supports Vue and UnoCSS.
4+
5+
[![Netlify Status](https://api.netlify.com/api/v1/badges/0624323a-339f-48da-8b28-03037d664c40/deploy-status)](https://app.netlify.com/sites/astro-theme-vitesse/deploys)
6+
7+
## Preview
8+
9+
![Preview Image](./public/preview.jpg)
10+
11+
## Features
12+
13+
- 100 / 100 Lighthouse performance.
14+
- Responsive.
15+
- SEO-friendly.
16+
- Light / Dark Theme.
17+
- Markdown support.
18+
- <a target="_blank" href="https://mdxjs.com/">MDX</a> (components in your markdown) support.
19+
- <a target="_blank" href="https://vuejs.org/">Vue</a> SFC component support.
20+
- Auto generated sitemap and RSS Feed <a target="_blank" href="https://vueuse.org/">VueUse</a> & <a target="_blank" href="https://lodash.com/">Lodash</a> support.
21+
- Use the <a target="_blank" href="https://unocss.dev/">UnoCSS</a> for style, it's fast.
22+
23+
## Lighthouse Performance
24+
25+
![Lighthouse Performance Image](./public/lighthouse.jpg)
26+
27+
## Quick Start
28+
29+
[![Deploy to Netlify Button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/kieranwv/astro-theme-vitesse)
30+
31+
Click this button, it will create a new repo for you that looks exactly like this one, and sets that repo up immediately for deployment on Netlify.
32+
33+
If you just want to develop locally, you can [create a repo](https://github.com/kieranwv/astro-theme-vitesse/generate) from this template on GitHub.
34+
35+
## Usage
36+
37+
First, install the dependencies.
38+
39+
```bash
40+
npm install
41+
```
42+
43+
Just run and visit http://localhost:1977.
44+
45+
```bash
46+
npm run dev
47+
```
48+
49+
> Node.js version 18 or higher is required for this project.
50+
51+
To build the App, you can run:
52+
53+
```bash
54+
npm run build
55+
```
56+
57+
You will then see the `dist` folder generated for publishing, which you can preview locally with the following command.
58+
59+
```bash
60+
npm run preview
61+
```
62+
63+
## Use pnpm / yarn
64+
65+
If you want to use pnpm or yarn as a package management tool, please refer to the following steps.
66+
67+
> If `preinstall` exists in `scripts`, remove it first.
68+
69+
### pnpm
70+
71+
Replace `"pre-commit": "npx lint-staged"` in package.json with `"pre-commit": "pnpm lint-staged"`.
72+
73+
And replace `"*": "npm run lint:fix"` with `"*": "pnpm lint:fix"`.
74+
75+
Like this:
76+
77+
```json
78+
{
79+
// ...
80+
"simple-git-hooks": {
81+
"pre-commit": "pnpm lint-staged"
82+
},
83+
"lint-staged": {
84+
"*": "pnpm lint:fix"
85+
}
86+
}
87+
```
88+
89+
### yarn
90+
91+
Replace `"pre-commit": "npx lint-staged"` in package.json with `"pre-commit": "yarn lint-staged"`.
92+
93+
And replace `"*": "npm run lint:fix"` with `"*": "yarn lint:fix"`.
94+
95+
Like this:
96+
97+
```json
98+
{
99+
// ...
100+
"simple-git-hooks": {
101+
"pre-commit": "yarn lint-staged"
102+
},
103+
"lint-staged": {
104+
"*": "yarn lint:fix"
105+
}
106+
}
107+
```
108+
109+
## License
110+
111+
[MIT License](./LICENSE) © 2024 [Kieran Wang](https://github.com/kieranwv/)

astro.config.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import mdx from '@astrojs/mdx'
2+
import sitemap from '@astrojs/sitemap'
3+
import vue from '@astrojs/vue'
4+
import { defineConfig } from 'astro/config'
5+
import UnoCSS from 'unocss/astro'
6+
7+
export default defineConfig({
8+
site: 'https://astro-theme-vitesse.netlify.app/',
9+
server: {
10+
port: 1977,
11+
},
12+
integrations: [
13+
mdx(),
14+
sitemap(),
15+
UnoCSS({
16+
injectReset: true,
17+
}),
18+
vue(),
19+
],
20+
markdown: {
21+
shikiConfig: {
22+
themes: {
23+
light: 'github-light-default',
24+
dark: 'github-dark-default',
25+
},
26+
wrap: true,
27+
},
28+
},
29+
})

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu({
4+
vue: true,
5+
typescript: true,
6+
astro: true,
7+
formatters: {
8+
astro: true,
9+
css: true,
10+
},
11+
})

0 commit comments

Comments
 (0)