|
| 1 | +# Vitesse theme for Astro |
| 2 | + |
| 3 | +A minimal, SEO-friendly portfolio and blog theme for Astro, supports Vue and UnoCSS. |
| 4 | + |
| 5 | +[](https://app.netlify.com/sites/astro-theme-vitesse/deploys) |
| 6 | + |
| 7 | +## Preview |
| 8 | + |
| 9 | + |
| 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 | + |
| 26 | + |
| 27 | +## Quick Start |
| 28 | + |
| 29 | +[](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/) |
0 commit comments