forked from kingwrcy/moments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
232 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"projectName": "moments", | ||
"projectOwner": "kingwrcy", | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"files": [ | ||
"README.md" | ||
], | ||
"imageSize": 80, | ||
"commit": true, | ||
"commitConvention": "eslint", | ||
"contributors": [ | ||
{ | ||
"login": "kingwrcy", | ||
"name": "kingwrcy", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/1247324?v=4", | ||
"profile": "https://github.com/kingwrcy", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "RandallAnjie", | ||
"name": "Randall", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/84122428?v=4", | ||
"profile": "https://github.com/RandallAnjie", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "Jonnyan404", | ||
"name": "jonny", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/20352705?v=4", | ||
"profile": "https://github.com/Jonnyan404", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "akarikun", | ||
"name": "akari", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/11921182?v=4", | ||
"profile": "https://github.com/akarikun", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "douseful", | ||
"name": "yee", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/52767905?v=4", | ||
"profile": "https://github.com/douseful", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "Chef5", | ||
"name": "Chef", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/38160059?v=4", | ||
"profile": "https://www.jschef.com", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "dinphy", | ||
"name": "小王先森", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/17978673?v=4", | ||
"profile": "https://xwsir.cn", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "athurg", | ||
"name": "Athurg Gooth", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/126313?v=4", | ||
"profile": "https://www.gooth.org", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "xuewenG", | ||
"name": "xuewenG", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/32838722?v=4", | ||
"profile": "https://github.com/xuewenG", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "Secretlovez", | ||
"name": "Secretlovez", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/40491055?v=4", | ||
"profile": "https://github.com/Secretlovez", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "jkjoy", | ||
"name": "浪子", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/23159890?v=4", | ||
"profile": "https://github.com/jkjoy", | ||
"contributions": [] | ||
}, | ||
{ | ||
"login": "lateautumn2", | ||
"name": "lateautumn2", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/57248164?v=4", | ||
"profile": "https://github.com/lateautumn2", | ||
"contributions": [] | ||
} | ||
], | ||
"contributorsPerLine": 7, | ||
"linkToUsage": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,143 @@ | ||
## Moments 极简朋友圈 | ||
# Moments - 极简朋友圈 | ||
|
||
v0.2.1使用了golang作为服务端重写,目前已经基本实现了0.2.0版本的大部分功能.包体积更小了. | ||
[![release](https://img.shields.io/badge/release-更新记录-blue)](https://github.com/kingwrcy/moments/releases) | ||
[![docker-release-status](https://img.shields.io/github/actions/workflow/status/kingwrcy/moments/docker-image-release.yml)](https://github.com/kingwrcy/moments/actions/workflows/docker-image-release.yml) | ||
[![docker-pull](https://img.shields.io/docker/pulls/kingwrcy/moments)](https://hub.docker.com/repository/docker/kingwrcy/moments) | ||
[![telegram-group](https://img.shields.io/badge/Telegram-group-blue)](https://t.me/simple_moments) | ||
[![discussion](https://img.shields.io/badge/moments-论坛-blue)](https://discussion.mblog.club) | ||
|
||
1. 增加了多用户模式,后台可以自由开启是否运行注册多用户. | ||
2. 支持在Linux/MacOS/Windows平台双击本地启动. | ||
3. 标签的定义,以#号开头,空格/空行结尾的中间的部分会被认为是标签. | ||
4. 完善了tag标签的选择,在memo发言的输入框里点击右键可以选择标签来插入. | ||
5. 支持了完整的markdown,但是目前样式只适配了常用的几个标签,更多的待接下来完善. | ||
6. 默认用户名密码`admin/a123456`,登陆后后台可以修改. | ||
从 v0.2.1 开始,使用 Golang 重写了服务端, 目前已经基本实现了 0.2.0 版本的功能,同时软件包体积也更小了。 | ||
|
||
[更多说明](https://discussion.mblog.club/post/pto2hqoFzDKzZMpvoPZKYuP) | ||
注意:如果你在找 v0.2.0 版本,请 [点击这里](https://github.com/kingwrcy/moments/blob/master/README.md)。 | ||
|
||
[交流TG群](https://t.me/simple_moments) | ||
# 功能列表 | ||
|
||
[交流论坛](https://discussion.mblog.club/) | ||
- 默认用户名和密码是 admin/a123456,登录后可以在后台修改 | ||
- 多用户模式,后台可以自由开启是否运行注册多用户 | ||
- 标签的定义,以 # 号开头,空格 / 空行结尾的中间的部分会被认为是标签 | ||
- 在 memo 发言的输入框里点击右键可以选择标签来插入 | ||
- 支持完整的 Markdown,但是目前样式只适配了常用的几个标签,更多的待接下来完善 | ||
- 代码块支持一键复制按钮 | ||
- 支持回到顶部按钮,PC 端和手机端都有 | ||
|
||
[0.2.0的README](https://github.com/kingwrcy/moments/blob/master/README.md) | ||
更多说明可以[点击这里查看](https://discussion.mblog.club/post/pto2hqoFzDKzZMpvoPZKYuP)。 | ||
|
||
# 使用教程 | ||
|
||
#### v0.2.5发布说明 2024-08-14 | ||
## 环境变量 | ||
|
||
1. 增加代码内容/发言内容强制换行. | ||
2. 尝试减小代码高亮的引入文件大小,加快首页打开速度 | ||
3. 修复首次加入标签时异常的问题 | ||
Moments 支持以下环境变量,可按需修改进行配置: | ||
|
||
#### v0.2.4发布说明 2024-08-09 | ||
| 变量名 | 解释 | 默认值 | | ||
| ----------------- | --------------------- | ------------------------------------------------------ | | ||
| PORT | 监听端口 | 3000 | | ||
| JWT_KEY | JWT 密钥 | 不填写则每次启动时随机生成,每次重启后需要重新登录 | | ||
| DB | sqlite 数据库存放目录 | 工作目录下的 db.sqlite,/app/data/db.sqlite | | ||
| UPLOAD_DIR | 上传文件本地目录 | 工作目录下的 upload,/app/data/upload | | ||
| LOG_LEVEL | 日志级别 | info,可选 debug | | ||
| ENABLE_SWAGGER | 是否启用 swagger 文档 | false,可选 true,启用后可访问路径 /swagger/index.html | | ||
| ENABLE_SQL_OUTPUT | 是否启用 SQL 调试日志 | false | | ||
|
||
1. 发言输入框不再支持#号开头的内容识别为标签了,标签改为单独一列,右键输入标签继续可以. | ||
2. 首页默认不自动加载下一页了,后台增加`是否自动加载下一页`的开关,需要的可以手动开启. | ||
3. 增加代码块的支持,支持语法高亮,使用方式是3个`符号之后跟上代码的语言即可. | ||
4. 修复传第二张图片会把前一张图片删除的bug. | ||
5. 尝试修复ios环境下safari浏览图片超宽的bug. | ||
6. 增加`回到顶部`按钮,pc和手机模式下都有. | ||
7. 修复登出按钮在pc无法看到的bug. | ||
8. 代码块增加一键复制按钮. | ||
## 使用 Docker | ||
|
||
注意:需要将以下示例中的 $JWT_KEY 替换为你的真实 JWT_KEY,生成方式可[参考这里](#jwt_key-生成)。 | ||
|
||
使用命令行启动容器: | ||
|
||
```bash | ||
docker run -d \ | ||
-e PORT=3000 \ | ||
-e JWT_KEY=$JWT_KEY \ | ||
-p 3000:3000 \ | ||
-v /var/moments:/app/data \ | ||
--name moments \ | ||
kingwrcy/moments:latest | ||
``` | ||
|
||
也可以使用 Docker Compose: | ||
|
||
```yaml | ||
services: | ||
moments: | ||
image: kingwrcy/moments:latest | ||
container_name: moments | ||
restart: always | ||
environment: | ||
PORT: 3000 | ||
JWT_KEY: $JWT_KEY | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- /var/moments:/app/data | ||
``` | ||
## 使用二进制文件 | ||
待补充 | ||
## JWT_KEY 生成 | ||
### 使用 OpenSSL | ||
执行以下命令生成 (仅测试了 Linux): | ||
```bash | ||
openssl rand -hex 32 | ||
``` | ||
|
||
### 使用 SHA256 | ||
|
||
执行以下命令生成 (仅测试了 Linux): | ||
|
||
```bash | ||
echo $RANDOM | sha256sum | ||
``` | ||
|
||
### 在线生成 | ||
|
||
打开 [https://tool.lu/uuid](https://tool.lu/uuid) 生成不带 `-` 的 UUID 作为 JWT_KEY。 | ||
|
||
# 其他版本 | ||
|
||
| 项目 | 演示地址 | | ||
| --------------------------------------------------------------- | -------------------------------------------------------------------- | | ||
| [RandallAnjie/moments](https://github.com/RandallAnjie/moments) | [https://moments.randallanjie.com](https://moments.randallanjie.com) | | ||
|
||
# Contributors | ||
|
||
感谢这些贡献代码的朋友。 | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kingwrcy"><img src="https://avatars.githubusercontent.com/u/1247324?v=4?s=80" width="80px;" alt="kingwrcy"/><br /><sub><b>kingwrcy</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RandallAnjie"><img src="https://avatars.githubusercontent.com/u/84122428?v=4?s=80" width="80px;" alt="Randall"/><br /><sub><b>Randall</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Jonnyan404"><img src="https://avatars.githubusercontent.com/u/20352705?v=4?s=80" width="80px;" alt="jonny"/><br /><sub><b>jonny</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/akarikun"><img src="https://avatars.githubusercontent.com/u/11921182?v=4?s=80" width="80px;" alt="akari"/><br /><sub><b>akari</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/douseful"><img src="https://avatars.githubusercontent.com/u/52767905?v=4?s=80" width="80px;" alt="yee"/><br /><sub><b>yee</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://www.jschef.com"><img src="https://avatars.githubusercontent.com/u/38160059?v=4?s=80" width="80px;" alt="Chef"/><br /><sub><b>Chef</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://xwsir.cn"><img src="https://avatars.githubusercontent.com/u/17978673?v=4?s=80" width="80px;" alt="小王先森"/><br /><sub><b>小王先森</b></sub></a><br /></td> | ||
</tr> | ||
<tr> | ||
<td align="center" valign="top" width="14.28%"><a href="https://www.gooth.org"><img src="https://avatars.githubusercontent.com/u/126313?v=4?s=80" width="80px;" alt="Athurg Gooth"/><br /><sub><b>Athurg Gooth</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xuewenG"><img src="https://avatars.githubusercontent.com/u/32838722?v=4?s=80" width="80px;" alt="xuewenG"/><br /><sub><b>xuewenG</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Secretlovez"><img src="https://avatars.githubusercontent.com/u/40491055?v=4?s=80" width="80px;" alt="Secretlovez"/><br /><sub><b>Secretlovez</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jkjoy"><img src="https://avatars.githubusercontent.com/u/23159890?v=4?s=80" width="80px;" alt="浪子"/><br /><sub><b>浪子</b></sub></a><br /></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lateautumn2"><img src="https://avatars.githubusercontent.com/u/57248164?v=4?s=80" width="80px;" alt="lateautumn2"/><br /><sub><b>lateautumn2</b></sub></a><br /></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
|
||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! | ||
|
||
# Star History | ||
|
||
[![Star History Chart](https://api.star-history.com/svg?repos=kingwrcy/moments&type=Date)](https://star-history.com/#kingwrcy/moments&Date) |