Git Product home page Git Product logo

puti's Introduction

Puti Logo

Puti

✒️ Puti is a blog system written in Golang.

CircleCI Go Report Card FOSSA Status Release License

中文 | Engilsh

状态

Puti 项目现在仍在开发中。因为是作者接触 Go 语言的第一个项目,所以代码质量不到位之处,将会在未来不断优化,非常欢迎你的贡献。

现阶段希望等 Go2 出来之后做一些模块化重构,然后继续完善功能。

环境依赖

  • Golang 1.11+ (Build using modules)
  • MySQL
  • Nginx (Optional)

Golang 1.11 版本开始支持 go module,本项目使用了go module;Nginx 为可选配置。

功能与计划

项目计划实现以及已经实现的功能如下:

  • 功能
    • 登录注册
      • 登录
      • 注册
      • 第三方接入(github等)
    • 文章
    • 页面
    • 分类
    • 标签
    • 专题
    • 链接
    • 媒体
    • 用户
    • 评论
    • 设置
      • 普通设置
      • 第三方设置(接入GItHub,WeChat等)
    • 主题
      • 主题支持
      • 默认主题(Emma)
      • 自由切换
      • 管理界面直接修改主题模板文件
    • 插件
      • 插件支持
      • 插件管理(上传、删除等)
    • 邮件
      • 邮件配置
      • 邮件发送
  • 技术支持
    • 完善的 i18n
    • 邮件服务配置
    • TOC (目前在前端主题实现)
    • 配置图片裁切
    • HTTPS
    • WebServer 转发
    • 头像接入
    • OAuth
    • 媒体文件云存储
  • 生态
    • Docker 镜像支持
    • 配置化的自动部署脚本
    • 简单的统计系统

截图

Docker use Docker use

快速开始

配置

Puti 的配置文件位于configs下的config.yaml,初次使用可以从config.yaml.example 初始化配置文件。
需要注意的配置:

配置 说明
addr HTTP 端口
jwt_secret Json web token 秘钥
tls.https_open 开启 HTTPS
tls.addr HTTPS 端口
tls.cert SSL证书路径
tls.key SSL私钥路径
db.name 数据库名称
db.addr 数据库 HOST:PORT
db.username 数据库登录名
db.password 数据库密码

安装

源码安装

源码安装要求系统已经安装要求版本的 Go 语言,因为建议使用 Go 1.11 及以上版本,所以我们不关注 GOPATH 的问题。
鉴于某种因素,为了有更好的包下载体验,项目中已经内置了 Vendor 目录,并且统一用 go module 来管理。

# 下载
$ go get -u github.com/puti-projects/puti

# 使用Makefile来构建程序
$ cd $GOPATH/src/github.com/puti-projects/puti
$ make

使用 Docker

使用现成的镜像

我们已经提供了现成的镜像,可以直接拉取使用:

# 从 Docker Hub 拉取镜像
$ docker pull puti/puti

# 创建需要挂载的目录,例如:`/data/puti`为应用文件存放目录,`/data/logs/puti`为日志存放目录
$ mkdir -p /data/puti /data/logs/puti

# 第一次通过`docker run`来创建一个容器
$ docker run --name=puti -p 80:8000 -p 443:8080 -v /data/puti:/data/puti -v /data/logs/puti:/data/logs/puti puti/puti

# 使用 `docker stop``docker start`来停止,关闭容器。
$ docker stop puti
$ docker start puti

更多内容查看:Docker use

使用可配置的部署脚本

我们提供了简单方便地一键部署 Docker-compose 脚本文件,懒人必备。具体使用查看:puti-projects/puti-environment

使用

主题

更多主题制作中。目前提供默认主题 Emma 和 Lin,为两种不同风格的主题。

文档

TODO

更新日志

Detailed changes for each release are documented in the changelog file.

依赖

依赖 关于
gin-gonic/gin HTTP web framework written in Go
jinzhu/gorm The ORM library for Golang
patrickmn/go-cache An in-memory key:value store/cache
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 A markdown editor

Q & A

作者

Puti is a project by

贡献


goozp

💻📚🎨

License

FOSSA Status

puti's People

Contributors

fossabot avatar goozp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.