Skip to content

Commit 85da581

Browse files
authored
Merge pull request #54 from JSREI/dev
add website
2 parents 1b5f5d3 + f06bbca commit 85da581

Some content is hidden

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

55 files changed

+12673
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # 当推送到main分支时触发
7+
# 允许手动触发工作流
8+
workflow_dispatch:
9+
10+
# 权限设置
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build-and-deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout 🛎️
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Node.js 🔧
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '18'
25+
cache: 'npm'
26+
cache-dependency-path: './script-hook-website/package-lock.json'
27+
28+
- name: Install Dependencies 📦
29+
run: |
30+
cd script-hook-website
31+
npm ci
32+
33+
- name: Build 🏗️
34+
run: |
35+
cd script-hook-website
36+
npm run build
37+
38+
- name: Deploy 🚀
39+
uses: JamesIves/github-pages-deploy-action@v4
40+
with:
41+
folder: script-hook-website/dist # 要部署的文件夹
42+
branch: gh-pages # 部署到的分支
43+
clean: true # 在部署前清理目标分支

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ dist
119119
# TernJS port file
120120
.tern-port
121121

122+
# VS Code settings
123+
.vscode/
124+
122125
# Stores VSCode versions used for testing VSCode extensions
123126
.vscode-test
124127

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Change Log
22

3-
# v0.0.1(2021年-01-02)
3+
# v0.1(2021年-01-02)
44
- 在逆向时有初步的心得,并将其整理为一个简单的脚本。
55

6-
# v0.0.2(不记得了)
6+
# v0.2(不记得了)
77
- 具体啥功能不记得了,应该是进行了一些优化
88

9-
# v0.0.3(2025-01-09)
9+
# v0.3(2025-01-09)
1010
- 完全重做,增加了界面、控制台的支持,对Hook功能也进行了增强。
1111

12+
# v0.4
13+
- 重构为使用TypeScript
14+
15+
16+
17+
18+
1219

script-hook-website/README.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# JS Script Hook Website
2+
3+
<div align="right">
4+
<a href="README.md">English</a> | <a href="README.md">中文</a>
5+
</div>
6+
7+
## About
8+
9+
This is the official website for the JS Script Hook project, featuring a React-based SPA that showcases the library's features, provides installation instructions, and offers community support resources.
10+
11+
The website is built with React, TypeScript, and supports full internationalization with both English and Chinese languages.
12+
13+
## Features
14+
15+
- Responsive design that works on all devices
16+
- Comprehensive internationalization (i18n) support for English and Chinese
17+
- Optimized SEO metadata with language-specific content
18+
- Interactive UI components to demonstrate the library's capabilities
19+
- Social sharing functionality
20+
21+
## Development
22+
23+
### Prerequisites
24+
25+
- Node.js (v14.0.0 or higher)
26+
- npm or yarn
27+
28+
### Installation
29+
30+
```bash
31+
# Clone the repository
32+
git clone https://github.com/JSREI/js-script-hook.git
33+
cd js-script-hook/script-hook-website
34+
35+
# Install dependencies
36+
npm install
37+
# or
38+
yarn install
39+
```
40+
41+
### Development Server
42+
43+
```bash
44+
# Start the development server
45+
npm start
46+
# or
47+
yarn start
48+
```
49+
50+
The website will be available at `http://localhost:8080`.
51+
52+
### Building for Production
53+
54+
```bash
55+
# Build for production
56+
npm run build
57+
# or
58+
yarn build
59+
```
60+
61+
The compiled website will be available in the `dist` directory.
62+
63+
## Internationalization
64+
65+
The website supports both English and Chinese languages. The language is automatically detected based on the user's browser settings, but can also be manually selected through the language switcher in the header.
66+
67+
Translation files are located in:
68+
- `src/i18n/locales/en.json` (English)
69+
- `src/i18n/locales/zh.json` (Chinese)
70+
71+
## Deployment
72+
73+
The website is deployed to GitHub Pages automatically via GitHub Actions when changes are pushed to the main branch.
74+
75+
---
76+
77+
<div align="center">
78+
<h1>JS Script Hook 网站</h1>
79+
</div>
80+
81+
<div align="right">
82+
<a href="README.md">English</a> | <a href="README.md">中文</a>
83+
</div>
84+
85+
## 简介
86+
87+
这是JS Script Hook项目的官方网站,基于React的单页应用程序,展示了该库的功能特性,提供安装指南,并提供社区支持资源。
88+
89+
该网站使用React和TypeScript构建,支持英文和中文的完整国际化。
90+
91+
## 特性
92+
93+
- 响应式设计,适用于所有设备
94+
- 全面支持英文和中文的国际化(i18n)
95+
- 针对不同语言优化的SEO元数据
96+
- 交互式UI组件,展示库的功能
97+
- 社交媒体分享功能
98+
99+
## 开发
100+
101+
### 环境要求
102+
103+
- Node.js (v14.0.0或更高版本)
104+
- npm或yarn
105+
106+
### 安装
107+
108+
```bash
109+
# 克隆仓库
110+
git clone https://github.com/JSREI/js-script-hook.git
111+
cd js-script-hook/script-hook-website
112+
113+
# 安装依赖
114+
npm install
115+
#
116+
yarn install
117+
```
118+
119+
### 开发服务器
120+
121+
```bash
122+
# 启动开发服务器
123+
npm start
124+
#
125+
yarn start
126+
```
127+
128+
网站将在`http://localhost:8080`可访问。
129+
130+
### 生产环境构建
131+
132+
```bash
133+
# 构建生产版本
134+
npm run build
135+
#
136+
yarn build
137+
```
138+
139+
编译后的网站将在`dist`目录中可用。
140+
141+
## 国际化
142+
143+
该网站支持英文和中文两种语言。语言会根据用户的浏览器设置自动检测,也可以通过页头的语言切换器手动选择。
144+
145+
翻译文件位于:
146+
- `src/i18n/locales/en.json`(英文)
147+
- `src/i18n/locales/zh.json`(中文)
148+
149+
## 部署
150+
151+
当更改推送到主分支时,网站会通过GitHub Actions自动部署到GitHub Pages。

0 commit comments

Comments
 (0)