Skip to content

Commit 3c9b995

Browse files
feat(init): 项目初始化
0 parents  commit 3c9b995

File tree

116 files changed

+18062
-0
lines changed

Some content is hidden

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

116 files changed

+18062
-0
lines changed

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
groups:
8+
patch-updates:
9+
patterns:
10+
- "*"
11+
update-types:
12+
- "patch"
13+
minor-updates:
14+
patterns:
15+
- "*"
16+
update-types:
17+
- "minor"
18+
pull-request-branch-name:
19+
separator: "-"
20+
ignore:
21+
- dependency-name: "*"
22+
update-types: ["version-update:semver-major"]

.github/workflows/biome.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Code quality
2+
3+
on:
4+
push:
5+
branches: [ main ] # Adjust branches as needed
6+
pull_request:
7+
branches: [ main ] # Adjust branches as needed
8+
9+
jobs:
10+
quality:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
- name: Setup Biome
16+
uses: biomejs/setup-biome@f382a98e582959e6aaac8e5f8b17b31749018780 # v2.5.0
17+
with:
18+
version: latest
19+
- name: Run Biome
20+
run: biome ci ./src --reporter=github

.github/workflows/build.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and Check
2+
3+
on:
4+
push:
5+
branches: [ main ] # Adjust branches as needed
6+
pull_request:
7+
branches: [ main ] # Adjust branches as needed
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
check:
18+
strategy:
19+
matrix:
20+
node: [ 22, 23 ]
21+
runs-on: ubuntu-latest
22+
name: Astro Check for Node.js ${{ matrix.node }}
23+
steps:
24+
- name: Setup Node.js
25+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
26+
with:
27+
node-version: ${{ matrix.node }} # Use LTS
28+
29+
- name: Checkout
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
32+
- name: Setup pnpm
33+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
34+
with:
35+
run_install: false # Disable auto-install
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Run Astro Check
41+
run: pnpm astro check
42+
43+
build:
44+
strategy:
45+
matrix:
46+
node: [ 22, 23 ]
47+
runs-on: ubuntu-latest
48+
name: Astro Build for Node.js ${{ matrix.node }} # Corrected job name
49+
steps:
50+
- name: Setup Node.js
51+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
52+
with:
53+
node-version: ${{ matrix.node }}
54+
55+
- name: Checkout
56+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+
58+
- name: Setup pnpm
59+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
60+
with:
61+
run_install: false # Disable auto-install
62+
63+
- name: Install dependencies
64+
run: pnpm install --frozen-lockfile
65+
66+
- name: Run Astro Build
67+
run: pnpm astro build

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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
24+
25+
package-lock.json
26+
bun.lockb
27+
yarn.lock

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
manage-package-manager-versions = true

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["biomejs.biome", "astro-build.astro-vscode"]
3+
}

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "biomejs.biome",
4+
"[javascript]": {
5+
"editor.defaultFormatter": "biomejs.biome"
6+
},
7+
"[javascriptreact]": {
8+
"editor.defaultFormatter": "biomejs.biome"
9+
},
10+
"[typescript]": {
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[typescriptreact]": {
14+
"editor.defaultFormatter": "biomejs.biome"
15+
},
16+
"editor.codeActionsOnSave": {
17+
"source.fixAll": "explicit",
18+
"quickfix.biome": "always",
19+
"source.organizeImports.biome": "always"
20+
},
21+
"frontMatter.dashboard.openOnStart": false
22+
}

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# Contributing
3+
4+
Thank you for your interest in contributing!
5+
6+
## Before You Start
7+
8+
If you plan to make major changes (especially new features or design changes), please open an issue or discussion before starting work. This helps ensure your effort aligns with the project's direction.
9+
10+
## Submitting Code
11+
12+
Please keep each pull request focused on a single purpose. Avoid mixing unrelated changes in one PR, as this can make reviewing and merging code more difficult.
13+
14+
Please use the [Conventional Commits](https://www.conventionalcommits.org/) format for your commit messages whenever possible. This keeps our history clear and consistent.
15+
16+
Before submitting code, please run the appropriate commands to check for errors and format your code.
17+
18+
```bash
19+
pnpm check
20+
pnpm format
21+
```

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 saicaca
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: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# 🍥Fuwari
2+
![Node.js >= 20](https://img.shields.io/badge/node.js-%3E%3D20-brightgreen)
3+
![pnpm >= 9](https://img.shields.io/badge/pnpm-%3E%3D9-blue)
4+
[![DeepWiki](https://img.shields.io/badge/DeepWiki-saicaca%2Ffuwari-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/saicaca/fuwari)
5+
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari?ref=badge_shield&issueType=license)
6+
7+
A static blog template built with [Astro](https://astro.build).
8+
9+
[**🖥️ Live Demo (Vercel)**](https://fuwari.vercel.app)
10+
11+
![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png)
12+
13+
🌏 README in
14+
[**中文**](https://github.com/saicaca/fuwari/blob/main/docs/README.zh-CN.md) /
15+
[**日本語**](https://github.com/saicaca/fuwari/blob/main/docs/README.ja.md) /
16+
[**한국어**](https://github.com/saicaca/fuwari/blob/main/docs/README.ko.md) /
17+
[**Español**](https://github.com/saicaca/fuwari/blob/main/docs/README.es.md) /
18+
[**ไทย**](https://github.com/saicaca/fuwari/blob/main/docs/README.th.md) /
19+
[**Tiếng Việt**](https://github.com/saicaca/fuwari/blob/main/docs/README.vi.md) (Provided by the community and may not always be up-to-date)
20+
21+
## ✨ Features
22+
23+
- [x] Built with [Astro](https://astro.build) and [Tailwind CSS](https://tailwindcss.com)
24+
- [x] Smooth animations and page transitions
25+
- [x] Light / dark mode
26+
- [x] Customizable theme colors & banner
27+
- [x] Responsive design
28+
- [x] Search functionality with [Pagefind](https://pagefind.app/)
29+
- [x] [Markdown extended features](https://github.com/saicaca/fuwari?tab=readme-ov-file#-markdown-extended-syntax)
30+
- [x] Table of contents
31+
- [x] RSS feed
32+
33+
## 🚀 Getting Started
34+
35+
1. Create your blog repository:
36+
- [Generate a new repository](https://github.com/saicaca/fuwari/generate) from this template or fork this repository.
37+
- Or run one of the following commands:
38+
```sh
39+
npm create fuwari@latest
40+
yarn create fuwari
41+
pnpm create fuwari@latest
42+
bun create fuwari@latest
43+
deno run -A npm:create-fuwari@latest
44+
```
45+
2. To edit your blog locally, clone your repository, run `pnpm install` to install dependencies.
46+
- Install [pnpm](https://pnpm.io) `npm install -g pnpm` if you haven't.
47+
3. Edit the config file `src/config.ts` to customize your blog.
48+
4. Run `pnpm new-post <filename>` to create a new post and edit it in `src/content/posts/`.
49+
5. Deploy your blog to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/). You need to edit the site configuration in `astro.config.mjs` before deployment.
50+
51+
## 📝 Frontmatter of Posts
52+
53+
```yaml
54+
---
55+
title: My First Blog Post
56+
published: 2023-09-09
57+
description: This is the first post of my new Astro blog.
58+
image: ./cover.jpg
59+
tags: [Foo, Bar]
60+
category: Front-end
61+
draft: false
62+
lang: jp # Set only if the post's language differs from the site's language in `config.ts`
63+
---
64+
```
65+
66+
## 🧩 Markdown Extended Syntax
67+
68+
In addition to Astro's default support for [GitHub Flavored Markdown](https://github.github.com/gfm/), several extra Markdown features are included:
69+
70+
- Admonitions ([Preview and Usage](https://fuwari.vercel.app/posts/markdown-extended/#admonitions))
71+
- GitHub repository cards ([Preview and Usage](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards))
72+
- Enhanced code blocks with Expressive Code ([Preview](https://fuwari.vercel.app/posts/expressive-code/) / [Docs](https://expressive-code.com/))
73+
74+
## ⚡ Commands
75+
76+
All commands are run from the root of the project, from a terminal:
77+
78+
| Command | Action |
79+
|:---------------------------|:----------------------------------------------------|
80+
| `pnpm install` | Installs dependencies |
81+
| `pnpm dev` | Starts local dev server at `localhost:4321` |
82+
| `pnpm build` | Build your production site to `./dist/` |
83+
| `pnpm preview` | Preview your build locally, before deploying |
84+
| `pnpm check` | Run checks for errors in your code |
85+
| `pnpm format` | Format your code using Biome |
86+
| `pnpm new-post <filename>` | Create a new post |
87+
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
88+
| `pnpm astro --help` | Get help using the Astro CLI |
89+
90+
## ✏️ Contributing
91+
92+
Check out the [Contributing Guide](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md) for details on how to contribute to this project.
93+
94+
## 📄 License
95+
96+
This project is licensed under the MIT License.
97+
98+
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari.svg?type=large&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari?ref=badge_large&issueType=license)

0 commit comments

Comments
 (0)