Skip to content

Commit

Permalink
update: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
goozp committed Nov 29, 2023
1 parent 8fe2058 commit 226f83b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 40 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Puti 项目现在仍在开发中,目标是面向极客的下一代写作系统
- Golang 1.13+ (Build using modules)
- MySQL

本项目使用了 Go Modules,所以建议使用 Go 1.13 以上版本;项目不依赖 Nginx 之类的 Web Server,但是你可以配置并且使用 Nginx。
本项目使用了 Go Modules,所以需使用 Go 1.13 以上版本。

项目不依赖 Nginx 之类的 Web Server,默认启用自动HTTPS获取Let's Encrypt证书,但是你可以配置并且使用 Nginx。

## 功能与计划

Expand Down Expand Up @@ -102,19 +104,20 @@ Puti 项目现在仍在开发中,目标是面向极客的下一代写作系统
Puti 的配置文件位于 `configs` 下的 `config.yaml`,初次使用可以从 `config.yaml.example` 初始化配置文件。
需要注意的配置:

| 配置 | 说明 |
| :---------------- | :------------------------------------ |
| server.http_port | HTTP 端口 |
| server.https_open | 是否开启 HTTPS |
| server.auto_cert | 是否开启自动 HTTPS |
| server.https_port | HTTPS 端口 |
| server.tls_cert | 如果不是自动 HTTPS,配置 SSL 证书路径 |
| server.tls_key | 如果不是自动 HTTPS,配置 SSL 私钥路径 |
| safety.jwt_secret | Json web token 秘钥 |
| db.name | 数据库名称 |
| db.addr | 数据库 HOST:PORT |
| db.username | 数据库登录名 |
| db.password | 数据库密码 |
| 配置 | 说明 |
| :---------------- | :--------------------------------------------------------------------------------------- |
| server.http_port | HTTP 端口 |
| server.https_open | 是否开启 HTTPS |
| server.auto_cert | 是否开启自动 HTTPS |
| server.https_port | HTTPS 端口 |
| server.tls_cert | 如果不是自动 HTTPS,配置 SSL 证书路径 |
| server.tls_key | 如果不是自动 HTTPS,配置 SSL 私钥路径 |
| puti_domain | 应用绑定的域名,如开启自动 HTTPS,将自动获取域名Let's Encrypt证书;例如:www.example.com |
| safety.jwt_secret | Json web token 秘钥 |
| db.name | 数据库名称 |
| db.addr | 数据库 HOST:PORT |
| db.username | 数据库登录名 |
| db.password | 数据库密码 |

### 安装

Expand Down
31 changes: 17 additions & 14 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ This project is still developing, and the goal is the next generation writing sy
- Golang 1.13+ (Build using modules)
- MySQL

This project uses Go Modules, so it is recommended to use Go 1.13 or above; The project does not rely on Web Server such as Nginx, but you can configure and use Nginx.
This project uses Go Modules, so it is recommended to use Go 1.13 or above.

The project does not rely on Web Server such as Nginx, and automatic HTTPS is enabled by default to obtain Let's Encrypt certificates. Also you can configure and use Nginx.

## Features

Expand Down Expand Up @@ -102,19 +104,20 @@ The project plan implementation and the functions that have been implemented are
Puti's configuration file is `config.yaml` under path `configs`, and the configuration file can be initialized from `config.yaml.example` when first used.
Configuration to be aware of:

| Configuration | Description |
| :---------------- | :---------------------------------------------------- |
| server.http_port | HTTP Port |
| server.https_open | Open HTTPS |
| server.auto_cert | Open auto cert |
| server.https_port | HTTPS Port |
| server.tls_cert | If it is not automatic cert,the SSL certificate path |
| server.tls_key | If it is not automatic cert,the SSL private key path |
| safety.jwt_secret | Json web token secret key |
| db.name | Database name |
| db.addr | Database HOST:PORT |
| db.username | Database user |
| db.password | Database password |
| Configuration | Description |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| server.http_port | HTTP Port |
| server.https_open | Open HTTPS |
| server.auto_cert | Open auto cert |
| server.https_port | HTTPS Port |
| server.tls_cert | If it is not automatic cert,the SSL certificate path |
| server.tls_key | If it is not automatic cert,the SSL private key path |
| puti_domain | The domain name bound by the application, if automatic HTTPS is turned on, it will automatically obtain the domain name's Let's Encrypt certificate; for example: www.example.com |
| safety.jwt_secret | Json web token secret key |
| db.name | Database name |
| db.addr | Database HOST:PORT |
| db.username | Database user |
| db.password | Database password |

### Installation

Expand Down
2 changes: 1 addition & 1 deletion configs/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server:
runmode: debug # 开发模式, debug, release, test
name: puti # API Server 的名字
http_port: 8000 # HTTP 绑定端口
https_open: false # 是否开启 HTTPS
https_open: true # 是否开启 HTTPS
https_port: 8080 # HTTPS 绑定端口
auto_cert: true # 是否开启自动 https
tls_cert: configs/server.crt # 如果不开启自动 https,配置的证书
Expand Down
4 changes: 2 additions & 2 deletions docs/CHANGELOG_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## v0.4.2 Go Version Upgrade [2023-11-30]

# Feature and Enhancement
### Feature and Enhancement
- Go version updated to 1.21
- Front-end of the knowledge base supports partial loading
- Automatic HTTPS is enabled by default
- Default redirects are added, from non-www to www, and from http to https
- DockerHub image push is replaced by Github Action
- Jwt package is switched to [github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt)

# Bug fixes
### Bug fixes
- Failure in gosu installation in dockerfile

---
Expand Down
18 changes: 9 additions & 9 deletions theme/common/head/head.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{define "head/head"}}
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">

<title>{{.Title}}</title>
<meta name="keywords" content="{{.Setting.SiteKeywords}}" />
<meta name="description" content="{{.Setting.SiteDescription}}" />
<link rel="icon" type="image/x-icon" href="{{.Theme.Favicon}}">
<title>{{.Title}}</title>
<meta name="keywords" content="{{.Setting.SiteKeywords}}" />
<meta name="description" content="{{.Setting.SiteDescription}}" />
<link rel="icon" type="image/x-icon" href="{{.Theme.Favicon}}">

<meta name="owner" content="Puti Project" />
<meta name="copyright" content="Puti" />
<meta name="owner" content="Puti Project" />
<meta name="copyright" content="Puti" />
{{end}}

0 comments on commit 226f83b

Please sign in to comment.