GithubHelp home page GithubHelp logo

88250 / pipe Goto Github PK

View Code? Open in Web Editor NEW
400.0 400.0 96.0 32.6 MB

🎷 B3log 分布式社区的 Go 博客端节点系统,欢迎加入下一代社区网络。B3log distributed community blog-end node based on Go, welcome to join the next generation community network.

Home Page: https://ld246.com/tag/pipe

License: Other

Dockerfile 0.08% Shell 0.06% HTML 27.78% JavaScript 9.95% Vue 12.80% Go 34.56% SCSS 14.76%
b3log blog markdown pipe vditor

pipe's Introduction

Pipe

小而美的博客平台,为未来而构建





English

💡 简介

Pipe 是一款小而美的开源博客平台,专为程序员设计。Pipe 有着非常活跃的社区,可将文章作为帖子推送到社区,来自社区的回帖将作为博客评论进行联动(具体细节请浏览 B3log 构思 - 分布式社区网络)。

这是一种全新的网络社区体验,让热爱记录和分享的你不再感到孤单!

欢迎到 Pipe 官方讨论区了解更多。同时也欢迎关注 B3log 开源社区微信公众号 B3log开源

b3logos.jpg

🗃 案例

✨ 功能

  • 多用户博客平台
  • Markdown 编辑器支持三种编辑模式:所见即所得 / 即时渲染 / 分屏预览
  • 聚合分类 / 标签
  • 自定义导航
  • 多主题 / 多语言
  • Atom / RSS / Sitemap
  • 文章搜索
  • Hexo/Jekyll 导入 / 导出
  • 可配置动静分离
  • 支持 SQLite / MySQL / PostgreSQL

🎨 界面

开始使用

start.png

管理后台

console.png

编辑文章

post.png

主题选择

theme.png

主题 Gina

gina.png

🛠️ 安装

Pipe 仅支持通过 Docker 进行部署,如果你需要从源码构建可参考这里

Docker 部署

获取最新镜像:

docker pull b3log/pipe
  • 使用 MySQL 先手动建库(库名 pipe ,字符集使用 utf8mb4 ,排序规则 utf8mb4_general_ci ),然后启动容器:

    docker run --detach --name pipe --network=host \
        b3log/pipe --mysql="root:123456@(127.0.0.1:3306)/pipe?charset=utf8mb4&parseTime=True&loc=Local&timeout=1s" --runtime_mode=prod --port=5897 --server=http://localhost:5897

    为了简单,使用了主机网络模式来连接主机上的 MySQL。

  • 使用 SQLite

    docker run --detach --name pipe --volume ~/pipe.db:/opt/pipe/pipe.db --publish 5897:5897 \
        b3log/pipe --sqlite="/opt/pipe/pipe.db" --runtime_mode=prod --port=5897 --server=http://localhost:5897

    注意:需先确保 SQLite 数据库文件已存在。如果数据库文件不存在时,docker run --volume 参数默认将宿主路径识别为目录,并自动创建这个目录,这可能导致 pipe 创建 sqlite 数据库文件失败。新建数据库文件可以简单用 touch 命令,如:

  • $ touch ~/pipe.db

启动参数说明:

  • --port:进程监听端口
  • --server:访问时的链接

完整启动参数的说明可以使用 -h 来查看。

Docker 升级

  1. 拉取最新镜像
  2. 重启容器

可参考这里编写一个重启脚本,并通过 crontab 每日凌晨运行来实现自动更新。

NGINX 反代

upstream pipe {
    server localhost:5897;
}

server {
    listen 80;
    server_name pipe.b3log.org; # 配置为你自己的域名

    location / {
        proxy_pass http://pipe$request_uri;
        proxy_set_header  Host $host:$server_port;
        proxy_set_header  X-Real-IP  $remote_addr;
        client_max_body_size  10m;
    }
}

另外,可以参考 https://ld246.com/article/1517474627971 进行配置。

📜 文档

🏘️ 社区

📄 授权

Pipe 使用 木兰宽松许可证, 第2版 开源协议。

🙏 鸣谢

  • jQuery:JavaScript 工具库,用于主题页面
  • Vue.js:渐进式 JavaScript 框架
  • Nuxt.js:Vue.js 框架
  • Vuetify:Vue.js 的 Material 组件框架
  • Vditor: 浏览器端的 Markdown 编辑器
  • Gin:又快又好用的 golang HTTP Web 框架
  • GORM:极好的 golang ORM 库
  • SQLite:使用广泛的嵌入式 SQL 引擎
  • GCache:golang 缓存库
  • Gulu:Go 语言常用工具库,这个轱辘还算圆
  • Lute:一款结构化的 Markdown 引擎,支持 Go 和 JavaScript

特性说明

发布文章

Pipe 的文章编辑器支持 Markdown,并支持复制/粘贴图片、粘贴 HTML 自动转换 Markdown、流程图、数学公式等。

另外,可以为文章启用自动配图,会自动在文章最前面插入所选择的配图。

聚合分类

Pipe 使用“自底向上”的分类方式:

  1. 定义分类,并配置该分类包含的标签
  2. 查询某个分类文章列表时通过分类-> 标签集-> 标签关联的文章进行聚合

也就是说一篇文章在编辑时只需要打标签,访问分类时会根据该分类包含的标签将文章关联出来。这是一个自底向上的信息架构,在使用时更灵活一些,可以随时调整分类而不必重新更新文章。

域名绑定

在 Pipe 平台上的每个博客都可以配置域名,需要博主和服务器运维者分别操作:

  1. 博主在设置 -> 基础配置 -> 博客地址一栏填写域名
  2. 运维者通过配置 NGINX 实现域名到 /blogs/{username} 的反向代理
server {
    listen 80;
    server_name vanessa.b3log.org;

    location / {
        proxy_pass http://pipe/blogs/Vanessa/;
    }
}

导入 / 导出

Pipe 支持导入 Hexo/Jekyll 的 Markdown 文件,将需要导入的 Markdown 文件使用 zip 压缩上传即可。导入时会按标题去重,并自动按原文章的创建时间生成存档。

同样地,Pipe 也支持 Markdown 导出,格式为 Hexo。

链滴

在 Pipe 上发布文章时可选择是否自动推送到链滴上,这样能让更多人看到你创作的内容,更容易引起大家的关注和互动。

运维

数据库

Pipe 使用 SQLite3 数据库引擎,数据文件默认情况下存放在 ~/pipe.db,可以通过修改 pipe.json 的 DataFilePath 指定新的存放路径。

建议定期备份数据文件,避免意外情况导致数据丢失。

版本升级

在管理后台的关于中可以检查版本更新,如果提示有更新请尽快升级,一般来说升级只需要下载新的发布包然后部署重启,实际升级方式以每次版本发布公告为准。

FAQ

如何做友链页面?

Pipe 没有单独的友链管理功能。可以通过发一篇文章,然后在导航管理中新建一个友链导航跳转过去。

结语

pipe's People

Contributors

88250 avatar abcdsxg avatar cloudtrends avatar dependabot[bot] avatar ka1em avatar lianguan avatar linkerlin avatar localvar avatar logeable avatar marveliu avatar qinxiandiqi avatar vanessa219 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipe's Issues

Pipe启动后报错:Scan error on column index 1, name "created_at"

基本上是按照官方文档进行的傻瓜式搭建。除了mysql参数后面的∥seTime=True&loc=Local&timeout=1s由于字符报错被我截断了。

以下是报错内容。相关敏感内容做了脱敏处理

2020-08-07T06:10:13.802379689Z D 2020/08/07 14:10:13 confs.go:193: configurations [&model.Configuration{Server:"http://ip:5897", StaticServer:"http://ip:5897", StaticResourceVersion:"1596209481092", LogLevel:"debug", ShowSQL:false, SessionSecret:"xxx", SessionMaxAge:86400, RuntimeMode:"prod", SQLite:"", MySQL:"user:pw@(127.0.0.1:3306)/pipe?charset=utf8mb4", Postgres:"", Port:"5897", AxiosBaseURL:"/api", MockServer:"http://localhost:8888"}]
2020-08-07T06:10:13.805429718Z D 2020/08/07 14:10:13 themes.go:43: loaded [7] themes
2020-08-07T06:10:13.837058023Z D 2020/08/07 14:10:13 db.go:56: used [MySQL] as underlying database
2020-08-07T06:10:14.238637288Z I 2020/08/07 14:10:14 main.go:75: Pipe (v2.0.0) is running [http://ip:5897]
2020-08-07T14:10:17.163819382Z E 2020/08/07 22:10:17 blacklistcron.go:42: refresh blacklist IPs failed: [Get "https://hacpai.com/apis/blacklist/ip": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]
2020-08-07T15:11:41.701718425Z W 2020/08/07 23:11:41 oauthctl.go:101: can not get user by name [xxx]
2020-08-07T15:40:14.167840962Z E 2020/08/07 23:40:14 articlesrv.go:50: get platform most view articles failed: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
2020-08-07T15:40:14.170797452Z E 2020/08/07 23:40:14 recommendcron.go:50: not found author of article [id=1596813101689, authorID=0]
2020-08-07T15:49:28.197014309Z E 2020/08/07 23:49:28 initsrv.go:70: checks platform init status failed: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
2020-08-07T15:49:36.836880311Z W 2020/08/07 23:49:36 oauthctl.go:101: can not get user by name [xxx]

请问我该如何解决以让我的pipe正常运行?谢谢

自定义域名登录问题

版本:v1.8.8
域名:https://pipe.localvar.cn/
博客使用了另一个域名(nginx重定向):https://blog.localvar.cn/

选择文章,点击编辑,github登录后回到原页面,再点击编辑,一直重重前述过程,其它管理员页面有同样问题。

大概调了以下程序,好像是 session 部分有问题,怀疑是一个域名下的cookie在另一个域名下读不出来。

请问Pipe License类型?

Hi @88250
pipe这个新的blog平台很不错,但没有看到源代码的授权方式,请问License是什么类型的?可以在此基础上开发吗?

Good luck。

errors from cd console npm install

cd console
npm install

ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/Vanessa219/vuetify.git
npm ERR! Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!

编译pipi最新版本的错误

1、下载最新版本,git clone https://github.com/88250/pipe.git
2、编译的错误,
go build -i -v
..\github.com\gin-gonic\gin\binding\default_validator.go:11:2: cannot find package "github.com/go-playground/validator/v10" in any of:
D:\Program Files\Go\src\github.com\go-playground\validator\v10 (from $GOROOT)
D:\work\1CHCP\project\toolmaker\src\github.com\go-playground\validator\v10 (from
$GOPATH)
..\github.com\88250\pipe\controller\feedctl.go:20:2: cannot find package "github.com/gorilla/feeds" in any of:
D:\Program Files\Go\src\github.com\gorilla\feeds (from $GOROOT)
D:\work\1CHCP\project\toolmaker\src\github.com\gorilla\feeds (from $GOPATH)
..\github.com\88250\pipe\controller\sitemapctl.go:16:2: cannot find package "github.com/ikeikeikeike/go-sitemap-generator/stm" in any of:
D:\Program Files\Go\src\github.com\ikeikeikeike\go-sitemap-generator\stm (from $GOROOT)
D:\work\1CHCP\project\toolmaker\src\github.com\ikeikeikeike\go-sitemap-generator\stm (from $GOPATH)
..\github.com\88250\pipe\controller\articlectl.go:27:2: cannot find package "github.com/vinta/pangu" in any of:
D:\Program Files\Go\src\github.com\vinta\pangu (from $GOROOT)
D:\work\1CHCP\project\toolmaker\src\github.com\vinta\pangu (from $GOPATH)

3、单独获取依赖包也是错误的:
go get github.com\go-playground\validator\v10
package github.com/go-playground/validator/v10: cannot find package "github.com/go-playground/validator/v10" in
any of:
D:\Program Files\Go\src\github.com\go-playground\validator\v10 (from $GOROOT)
D:\work\1CHCP\project\toolmaker\src\github.com\go-playground\validator\v10 (from $GOPATH)

请问该如何处理?谢谢了。

是否可以提供前后端分离的版本

是否可以提供前后端分离的版本,这样维护/移植也比较方便。目前流行的的架构都是前后端分离,使用restful接口通讯。

谢谢

数据库连接池泄露

GetCategoryArticleCount 使用标准库sql查询,结果rows未关闭,导致连接池泄露

浏览计数插件化

文章浏览计数、博客浏览计数将通过引入 js 插件实现统计和展现,该插件由社区提供,数据存储和服务接口均在社区实现。


皮肤需要修改:文章列表浏览数、博客访问总数、文章页面浏览数,在出现这些计数变量的地方用 span 包上,例如:

<span data-uvstaturl="{{.Article.URL}}">{{.Article.ViewCount}}</span>

修复登录验证安全漏洞

Pipe 博客端的社区集成登录存在一个安全漏洞,影响范围是 v1.9.1-v2.0.0 间的所有版本,稍后会进行修复,感谢 cc thas 反馈 ❤️

github现在登陆不了

现在github登陆不了,我怎么用github的账号和b3log的账号关联,或者和微信账号关联登陆

或许可以期待一个docker一键最小脚本?caddy+sqlite那种?

你在什么场景下需要该功能?

请尽量清晰精准地描述你碰到的问题。

描述可能的解决方案

请尽量清晰精准地描述你期待我们要做的,描述你想到的实现方案。

描述你认为的候选方案

请尽量清晰精准地描述你能接受的候选解决方案。

其他信息

请提供关于该功能建议的其他附加信息。

社区图床更换新域名

img.hacpai.com 替换为 b3logfile.com,新上传的文件将会使用新域名,老地址仅支持老文件访问。

支持 PostgreSQL 数据库

Pipe会支持PostgreSQL数据库吗?修改也简单,1、加载postgresql driver;2、修改gorm type mediumtext为text;3、去掉SQL语句的中的``。

errors from postgresql

service/db.go:61)
[2022-02-03 15:58:39] pq: no schema has been selected to create in
F 2022/02/03 15:58:39 db.go:62: auto migrate tables failed: pq: no schema has been selected to create in

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.