docs: Update README & Add a README translation of Simplified Chinese #63

Open
Octopus058 wants to merge 7 commits from Octopus058/master into master
2 changed files with 160 additions and 0 deletions

View File

@ -1,3 +1,30 @@
<div align="center">
# Moe-Counter
Multiple styles of Moe-Counters to choose from
**English** | [简体中文](docs/README-zhcn.md)
![Moe-Counter](https://count.getloli.com/get/@Moe-counter.github)
</div>
<details>
<summary>More theme</summary>
##### asoul
![asoul](https://count.getloli.com/get/@demo?theme=asoul)
##### moebooru
![moebooru](https://count.getloli.com/get/@demo?theme=moebooru)
##### rule34
![Rule34](https://count.getloli.com/get/@demo?theme=rule34)
##### gelbooru
![Gelbooru](https://count.getloli.com/get/@demo?theme=gelbooru)</details>
=======
# *Moe Counter!*
多种风格可选的萌萌计数器
@ -240,6 +267,12 @@ For information on counter usage and configuration, refer to the [demo website](
### Install
#### Run on Replit
- Open the url [https://replit.com/@journeyad/Moe-Counter](https://replit.com/@journeyad/Moe-Counter)
- Just hit the **Fork** button
- And hit the **Run** button
#### Run on Glitch
- Open [Glitch project](https://glitch.com/~moe-counter-api)
@ -251,6 +284,11 @@ For information on counter usage and configuration, refer to the [demo website](
```shell
$ git clone https://github.com/journey-ad/Moe-Counter.git
$ cd Moe-Counter
$ yarn install
$ yarn start
$ pnpm install
$ pnpm run start
@ -258,6 +296,29 @@ $ pnpm run start
### Configuration
`config.yml`
```yaml
app:
# site: https://count.getloli.com # your website
port: 3000
db:
type: sqlite # sqlite or mongodb
```
If you use mongodb, you need to specify the environment variable `DB_URL`
```shell
# eg:
export DB_URL=mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count
```
Replit can use Secrets, check [documentation](https://docs.replit.com/programming-ide/storing-sensitive-information-environment-variables)
```
DB_URL="mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count"
=======
Set `.env` file to specify the environment variables. *[.env.example](./.env.example)*
```dosini
@ -285,6 +346,17 @@ LOG_LEVEL=debug
## Credits
* [replit](https://replit.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)
* rule34.xxx NSFW
* gelbooru.com NSFW
* [Icons8](https://icons8.com/icons/set/star)
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter?ref=badge_large)
=======
* [Glitch](https://glitch.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)

88
docs/README-zhcn.md Normal file
View File

@ -0,0 +1,88 @@
<div align="center">
# 萌萌计数器
多种风格可选的萌萌计数器
[English](README.md) | **简体中文**
![Moe-Counter](https://count.getloli.com/get/@Moe-counter.github)
</div>
<details>
<summary>更多风格</summary>
##### asoul
![asoul](https://count.getloli.com/get/@demo?theme=asoul)
##### moebooru
![moebooru](https://count.getloli.com/get/@demo?theme=moebooru)
##### rule34
![Rule34](https://count.getloli.com/get/@demo?theme=rule34)
##### gelbooru
![Gelbooru](https://count.getloli.com/get/@demo?theme=gelbooru)</details>
## 演示
[https://count.getloli.com](https://count.getloli.com)
## 使用
### 安装
#### 在Replit上运行
- 打开URL [https://replit.com/@journeyad/Moe-Counter](https://replit.com/@journeyad/Moe-Counter)
- 点击 **Fork** 按钮
- 点击 **Run** 按钮
#### 在自己的服务器上运行
```shell
$ git clone https://github.com/journey-ad/Moe-Counter.git
$ cd Moe-Counter
$ yarn install
$ yarn start
```
### 设置
`config.yml`
```yaml
app:
# site: https://count.getloli.com # your website
port: 3000
db:
type: sqlite # sqlite or mongodb
```
如果你使用的是mongodb需要指定环境变量`DB_URL`
```shell
# eg:
export DB_URL=mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count
```
Replit可以使用Secrets, 请查看[操作手册](https://docs.replit.com/programming-ide/storing-sensitive-information-environment-variables)
```
DB_URL="mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count"
```
## 鸣谢
* [replit](https://replit.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)
* rule34.xxx NSFW
* gelbooru.com NSFW
* [Icons8](https://icons8.com/icons/set/star)
## 许可
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter?ref=badge_large)