Skip to content

Commit 0653d3b

Browse files
astrobot-houstonaashu10sh
authored andcommitted
Initial commit from Astro
0 parents  commit 0653d3b

File tree

101 files changed

+16124
-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.

101 files changed

+16124
-0
lines changed

.github/dependabot.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: 2
2+
updates:
3+
# Enable npm (pnpm) dependency updates
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
# Check for updates every Monday at 09:00 (Asia/Shanghai)
8+
interval: 'weekly'
9+
day: 'monday'
10+
time: '09:00'
11+
timezone: 'Asia/Shanghai'
12+
# Limit the number of open PRs created by Dependabot
13+
open-pull-requests-limit: 10
14+
# Allow automatic merging of non-major version updates
15+
allow:
16+
- dependency-type: 'all'
17+
assignees:
18+
- 'the3ash'
19+
commit-message:
20+
# Use 'deps' for production dependencies, 'dev' for development dependencies
21+
prefix: 'deps'
22+
prefix-development: 'dev'
23+
include: 'scope'
24+
# Labels to add to Dependabot PRs
25+
labels:
26+
- 'dependencies'
27+
- 'automated'
28+
ignore:
29+
# Ignore major version updates (breaking changes)
30+
- dependency-name: '*'
31+
update-types: ['version-update:semver-major']
32+
versioning-strategy: auto
33+
34+
# Enable GitHub Actions updates
35+
- package-ecosystem: 'github-actions'
36+
directory: '/'
37+
schedule:
38+
# Check for updates every Monday at 09:00 (Asia/Shanghai)
39+
interval: 'weekly'
40+
day: 'monday'
41+
time: '09:00'
42+
timezone: 'Asia/Shanghai'
43+
open-pull-requests-limit: 10
44+
assignees:
45+
- 'the3ash'
46+
commit-message:
47+
prefix: 'github-actions'
48+
include: 'scope'
49+
labels:
50+
- 'dependencies'
51+
- 'automated'
52+
- 'github-actions'

.github/workflows/ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
check_suite:
9+
types: [completed]
10+
status: {}
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
checks: read
20+
21+
jobs:
22+
validate:
23+
name: Validate Code & Build
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: latest
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 'latest'
39+
cache: 'pnpm'
40+
41+
- name: Install dependencies
42+
run: pnpm install --frozen-lockfile --prefer-offline
43+
44+
- name: Check formatting (if prettier is available)
45+
run: |
46+
if [ -f "pnpm-lock.yaml" ] && pnpm list prettier &>/dev/null; then
47+
pnpm exec prettier --check .
48+
else
49+
echo "Prettier not configured, skipping format check"
50+
fi
51+
continue-on-error: true
52+
53+
- name: Run ESLint (if available)
54+
run: |
55+
if [ -f "pnpm-lock.yaml" ] && pnpm list eslint &>/dev/null; then
56+
pnpm exec eslint .
57+
else
58+
echo "ESLint not configured, skipping lint check"
59+
fi
60+
continue-on-error: true
61+
62+
- name: Run linting
63+
run: pnpm lint
64+
65+
- name: Build project
66+
run: pnpm build
67+
68+
auto-merge:
69+
name: Auto Merge
70+
runs-on: ubuntu-latest
71+
needs: validate
72+
if: >
73+
github.event_name == 'pull_request' &&
74+
github.event.pull_request.draft == false &&
75+
(
76+
github.actor == 'dependabot[bot]' ||
77+
contains(github.event.pull_request.labels.*.name, 'automerge')
78+
)
79+
80+
steps:
81+
- name: Checkout code
82+
uses: actions/checkout@v4
83+
with:
84+
token: ${{ secrets.GITHUB_TOKEN }}
85+
86+
- name: Auto approve Dependabot PRs
87+
if: github.actor == 'dependabot[bot]'
88+
uses: hmarr/auto-approve-action@v3
89+
with:
90+
github-token: ${{ secrets.GITHUB_TOKEN }}
91+
pull-request-number: ${{ github.event.pull_request.number }}
92+
93+
- name: Wait for all checks to complete
94+
uses: fountainhead/[email protected]
95+
id: wait-for-checks
96+
with:
97+
token: ${{ secrets.GITHUB_TOKEN }}
98+
checkName: 'Validate Code & Build'
99+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
100+
timeoutSeconds: 600
101+
intervalSeconds: 10
102+
103+
- name: Auto merge
104+
if: steps.wait-for-checks.outputs.conclusion == 'success'
105+
uses: actions/github-script@v7
106+
with:
107+
github-token: ${{ secrets.GITHUB_TOKEN }}
108+
script: |
109+
const { data: pullRequest } = await github.rest.pulls.get({
110+
owner: context.repo.owner,
111+
repo: context.repo.repo,
112+
pull_number: context.issue.number
113+
});
114+
115+
await github.rest.pulls.merge({
116+
owner: context.repo.owner,
117+
repo: context.repo.repo,
118+
pull_number: context.issue.number,
119+
merge_method: 'squash',
120+
commit_title: pullRequest.title,
121+
commit_message: pullRequest.body || ''
122+
});

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build output
2+
dist/
3+
.output/
4+
5+
# Generated types
6+
.astro/
7+
8+
# Dependencies
9+
node_modules/
10+
11+
# Logs
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
pnpm-debug.log*
16+
17+
# Environment variables
18+
.env
19+
.env.production
20+
21+
# macOS-specific files
22+
.DS_Store
23+
24+
# IDE settings
25+
.idea/
26+
27+
# Netlify build output
28+
.netlify/
29+

.prettierignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Build output
2+
dist/
3+
.output/
4+
5+
# Dependencies
6+
node_modules/
7+
8+
# Package manager files
9+
package-lock.json
10+
yarn.lock
11+
pnpm-lock.yaml
12+
13+
# Log files
14+
*.log
15+
16+
# Environment variables
17+
.env
18+
.env.*
19+
20+
# Cache directories
21+
.cache/
22+
.astro/
23+
24+
# Others
25+
.DS_Store
26+
coverage/
27+
28+
# Media files
29+
*.png
30+
*.jpg
31+
*.jpeg
32+
*.gif
33+
*.svg
34+
*.ico
35+
*.webp
36+
*.mp4
37+
*.webm
38+
*.mp3
39+
*.wav
40+
*.pdf

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"plugins": ["prettier-plugin-astro"],
3+
"semi": false,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"printWidth": 100,
7+
"tabWidth": 2
8+
}

.vscode/extensions.json

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

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

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) 2025 3ASH
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: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Chiri 🌸
2+
3+
![screenshot-light](public/screenshots/screenshot-light.png)
4+
![screenshot-dark](public/screenshots/screenshot-dark.png)
5+
6+
Chiri is a minimal blog theme built with [Astro](https://astro.build), offering customization options while preserving its clean aesthetic.
7+
8+
Check the [demo](https://astro-chiri.netlify.app/) for more details.
9+
10+
## Features
11+
12+
- Built with Astro
13+
- Responsive
14+
- Light / Dark mode
15+
- MDX
16+
- KaTeX
17+
- Sitemap
18+
- OpenGraph
19+
- RSS
20+
- ...
21+
22+
## Getting Started
23+
24+
1. [Fork](https://github.com/the3ash/astro-chiri/fork) this repository, or use this template to [create a new repository](https://github.com/new?template_name=astro-chiri&template_owner=the3ash).
25+
26+
2. Run the following commands:
27+
28+
```bash
29+
git clone <your-repo-url>
30+
31+
cd <your-repo-name>
32+
33+
pnpm install
34+
35+
pnpm dev
36+
```
37+
38+
3. Edit `src/config.ts` and `src/content/about/about.md` to your liking.
39+
40+
4. Use `pnpm new <title>` to create new posts, or add your posts to `src/content/posts`.
41+
42+
5. You need to set adapter as follows before deploying to Netlify, Vercel, or other platforms, but you can set `linkCard` to `false` in `src/config.ts` to skip this step:
43+
- **Netlify**: `pnpm add @astrojs/netlify` and add `adapter: netlify()` in `astro.config.ts`.
44+
- **Vercel**: `pnpm add @astrojs/vercel` and add `adapter: vercel()` in `astro.config.ts`.
45+
- **Cloudflare Pages**: `pnpm add @astrojs/cloudflare` and add `adapter: cloudflare()` in `astro.config.ts`.
46+
- **Static (e.g. GitHub Pages)**: `pnpm add @astrojs/static` and add `adapter: static()` in `astro.config.ts`.
47+
- Refer to [Astro Deployment Guides](https://docs.astro.build/en/guides/deploy/) for more details.
48+
49+
&emsp;[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start) [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new) [![Deploy to Cloudflare Pages](https://deploy.workers.cloudflare.com/button)](https://pages.cloudflare.com/start)
50+
51+
## Commands
52+
53+
- `pnpm new <title>` - Create a new post (use `_title` for drafts)
54+
- `pnpm update-theme` - Update the theme to the latest version
55+
56+
## References
57+
58+
- https://paco.me/
59+
- https://benji.org/
60+
- https://shud.in/
61+
- https://retypeset.radishzz.cc/
62+
63+
## License
64+
65+
MIT

0 commit comments

Comments
 (0)