✒️ Puti is a full-featured writing system written in Golang.
中文 | Engilsh
This project is still developing, and the goal is the next generation writing system for geeks.
- 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, and automatic HTTPS is enabled by default to obtain Let's Encrypt certificates. Also you can configure and use Nginx.
The project plan implementation and the functions that have been implemented are as follows:
- Features
- User
- Loign and register
- Loign
- Register
- Third party access (github, etc.)
- Blog system
- Article
- Page
- Category
- Tag
- Subject
- Knowledge base system
- Notebook
- Documentation set
- Media
- Link
- Comments
- Settings
- Normal setting
- Third party settings (GitHub, WeChat, etc.)
- Theme
- Theme support
- Default theme (Emma and Lin)
- Free switching
- Theme template files modification(backend console)
- Plugin
- Plugin support
- Plugin management (upload, delete, etc.)
- Email
- Mail configuration
- Mail delivery
- Technical Support
- Complete i18n support
- Mail service configuration
- Toc support (not theme)
- Configure image cropping
- HTTPS (Support automatic HTTPS)
- WebService forwarding
- Avatar access
- OAuth
- Media file cloud storage (for CDN)
- Ecology
- Docker image support
- Configured automatic deployment script
- Simple statistical system
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 |
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 |
The project uses Go Module, so Go 1.13 and above are required. The Vendor directory is currently removed, because now go proxy
can solve some problems well.
# Download
$ go get -u github.com/puti-projects/puti
# Use Makefile to build programs
$ cd $GOPATH/src/github.com/puti-projects/puti
$ make
We have provided a ready-made image that can be pulled directly:
# Pull image from Docker Hub.
$ docker pull puti/puti
# Create local directory for volume.
$ mkdir -p /data/puti /data/logs/puti
# Use `docker run` for the first time.
$ docker run --name=puti -p 80:8000 -p 443:8080 -v /data/puti:/data/puti -v /data/logs/puti:/data/logs/puti puti/puti
# Use `docker start` if you have stopped it.
$ docker stop puti
$ docker start puti
More information:Docker use
We provide a one-click deployment of the Docker-compose script file, which is convenience for build the working environment. puti-projects/puti-environment
If initialization failed, which may be a problem with the database configuration (currently there is no installation guide). An account is initialized by default with the default account admin
and password admin
. Please create your own account and remove the default account. Installation and guidance will be considered after the functions are complete.
More themes is creating. Now we have two different style default themes, Emma and Lin.
TODO
Detailed changes for each release are documented in the changelog file.
Thanks for these great open source libraries:
Dependency | About |
---|---|
gin-gonic/gin | HTTP web framework written in Go. |
go-gorm/gorm | The ORM library for Golang. |
allegro/bigcache | Efficient cache for gigabytes of data written in Go. |
spf13/viper | Complete configuration solution. |
go.uber.org/zap | Fast, structured, leveled logging. |
vuejs/vue | JavaScript framework for building UI on the web. |
ElemeFE/element | A Vue.js 2.0 UI Toolkit for Web. |
PanJiaChen/vue-element-admin | A front-end management background integration solution. |
hinesboy/mavonEditor (will be removed) | A markdown editor. |
Vanessa219/vditor | An in-browser markdown editor. |
88250/lute | A structured Markdown engine that supports Go and JavaScript. |
It is not necessary to use a WebServer such as Nginx, and supports automatic HTTPS; currently, no redirection judgment is made, such as root domain to www
domain, HTTP to HTTPS; better practice is to add another layer of WebServer.
goozp 💻📚🎨 |
---|
Thanks to JetBrains for providing free Goland IDE based on JetBrains OS licenses.
Puti is under the GPL-3.0 license. See the LICENSE file for details.