|
| 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