Skip to content

文章ID000nan #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/actions-cfblog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'CFBlog'

on:
watch:
types: started
schedule:
# 时间是按UTC设置的,实际执行时间,则自动按东八区执行
# 即+8小时,故实际执行时间为:18点
- cron: 0 10 * * *

jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id

steps:
- uses: actions/checkout@master
- name: Get search.xml、sitemap.xml
env:
CFBLOG_TOKEN: ${{ secrets.CFBLOG_TOKEN }}
CFBLOG_HOST: ${{ secrets.CFBLOG_HOST }}
run: |
curl 'https://'$CFBLOG_HOST'/admin/search.xml' -H 'cfblog_token: '$CFBLOG_TOKEN'' >search.xml
curl 'https://'$CFBLOG_HOST'/admin/sitemap.xml' -H 'cfblog_token: '$CFBLOG_TOKEN'' >sitemap.xml

- name: change to branch
env:
CFBLOG_BRANCH: ${{ secrets.CFBLOG_BRANCH }}
run: |
git checkout -b $CFBLOG_BRANCH
git checkout $CFBLOG_BRANCH

- name: commit change
run: |
git config --global user.email "[email protected]"
git config --global user.name "action"
git add .
git commit -m "Update from Github Action_"`date +%Y-%m-%d`

- name: push change
env:
GITHUB_LOGIN: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
git push -f https://$GITHUB_LOGIN:[email protected]/$GITHUB_REPOSITORY.git

- name: done
run: echo 'done'

51 changes: 32 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
本项目**CFBlog-Plus**是由基于[gdtool/cloudflare-workers-blog](https://github.com/gdtool/cloudflare-workers-blog)二次开发而来,主要是对cf worker中的js进行自主开源,并扩展了许多功能。

## 与CF-Blog相比,有哪些变更:

1. 开源部署在workers中的js,根据自己的理解,进行自主开发并开源,详见[index_plus.js](https://github.com/Arronlong/cfblog-plus/blob/master/index_plus.js)
2. 扩展md编辑器配置,可以自行根据需要修改配置。目前可配置支持html标签解析(默认关闭),更多设置参考[editormd官网](https://pandao.github.io/editor.md/)
3. 后台新建页和编辑页,自动设置时间和默认图片(使用JustNews主题时必须设置,否则样式大变),默认图片为:![](https://cdn.jsdelivr.net/gh/Arronlong/cdn@master/cfblog/cfblog-plus.png)
4. 添加文章置顶设置功能
5. 添加后台首页选择功能
6. 添加文章隐藏功能
7. 静态搜索

一些功能还在规划中:

1. 文章独立密码

## 演示地址: [https://blog.arrontg.cf](https://blog.arrontg.cf "cf-blog演示站点")

## 部署教程: [CFBlog-Plus搭建教程](https://blog.arrontg.cf/article/000004/.html)

## 更新日志: [CFBLOG-PLUS更新日志](https://blog.arrontg.cf/article/000006/.html)

**想了解index_plus.js的源码吗?看作者的源码解读文章《[解读CFBlog-Plus的源码](https://blog.arrontg.cf/article/000008/.html)》**

---

> 这是一个运行在cloudflare workers 上的博客程序,使用 cloudflare KV作为数据库,无其他依赖.
兼容静态博客的速度,以及动态博客的灵活性,方便搭建不折腾.
演示地址: [https://blog.gezhong.vip](https://blog.gezhong.vip "cf-blog演示站点")
演示地址: [https://blog.arrontg.cf](https://blog.arrontg.cf "cf-blog演示站点"),[https://blog.gezhong.vip](https://blog.gezhong.vip "cf-blog演示站点")

### TG 讨论群: [@CloudflareBlog](https://t.me/cloudflareblog "")
### 原CFBlog-TG 讨论群: [@CloudflareBlog](https://t.me/cloudflareblog )
# 主要特点
* 使用workers提供的KV作为数据库
* 使用cloudflare缓存html来降低KV的读写
Expand All @@ -12,32 +38,19 @@
* 一键发布(页面重构+缓存清理)

# 承载能力

* KV基本不存在瓶颈,因为使用了缓存,读写很少
* 唯一瓶颈是 workers的日访问量10w,大约能承受2万IP /日
* 文章数:1G存储空间,几万篇问题不大

# 部署步骤
这里没有实时预览真难受,一系列坑会慢慢填到博客,敬请关注 [https://blog.gezhong.vip](https://blog.gezhong.vip "")

# 更新日志

> [持续更新地址https://blog.gezhong.vip/article/009000/update-log.html](https://blog.gezhong.vip/article/009000/update-log.html "更新日志")

## 最近更新(2020-12-31)
* 2020-12-31:加入sitemap.xml
* 2020-12-24:本次更新,主要针对seo和阅读次数,以及多项细节优化
# 原作者更新日志

[CFBLOG更新日志](https://blog.gezhong.vip/article/009000/update-log.html)



### 前端演示:[https://blog.gezhong.vip](https://blog.gezhong.vip "演示站点")
### 前端演示:
![](https://s3.ax1x.com/2020/12/22/rrP81S.png)

### 后端演示:
![](https://s3.ax1x.com/2020/12/22/rrAWrD.png)

## 捐赠

如果你觉的本项目帮到你了,还请资持一下作者

* [捐赠](https://afdian.net/@zhaopp "爱发电")
Loading