3 Star 29 Fork 17

golang-007 / golang-blog

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

golang blog

golang 快速构建自己的博客。基于 gin, gorm 实现。

GitHub issues badge GitHub forks badge GitHub stars badge GitHub license badge Twitter badge

安装

1、 clone 本项目到你的目录

git clone https://github.com/anziguoer/golang-blog.git you_blog

2、配置配置文件

cp .env.example .env

3、在你在数据库中新建 database

4、将配置信息设置到文件 .env

[database]
Type = mysql
User = root
Password = root
Host = 127.0.0.1:3306
Name = go_blog
TablePrefix =

5、在你的代码目录 you_path 中执行命令

    go mod tidy

6、如果部分依赖包安装超时,建议配置代码

❯ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/test/Library/Caches/go-build"
GOENV="/Users/test/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/test/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/test/go/src/blog-hub/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/th/szc9dfkj5hjct1xcz0cyms5c0000gn/T/go-build492873372=/tmp/go-build -gno-record-gcc-switches -fno-common"

7、启动项目

go run main.go

浏览器输入地址: localhost:8888

8、新建账户:

数据库默认没有账户, 可以访问:localhost:8888/join

  • 输入用户名称
  • 输入用户邮箱
  • 输入用户密码

9、登录

localhost:8888/login

计划功能

  • [√] markdown 富文本编辑器
  • [√] 自动生成目录
  • [√] 标签功能优化
  • [×] markdown 文件转 html 文件
  • [×] cmd 创建 markdown 文章,并发布文章
  • [×] cmd 安装 blog
  • [×] 深色主题
  • [×] 优雅重启

感谢

golang-007/golang-blog

Repository Comments ( 0 )

Sign in to post a comment

About

golang 快速构建自己的博客。基于gin, gorm实现。http://fm126.top expand collapse
Go and 5 more languages
MIT
Cancel

Releases

No release

golang-blog

Contributors

All

Activities

Load More
can not load any more
Go
1
https://gitee.com/golang-007/golang-blog.git
git@gitee.com:golang-007/golang-blog.git
golang-007
golang-blog
golang-blog
master

Search