openrin / rin Goto Github PK
View Code? Open in Web Editor NEW⚡Dynamic blog based on Cloudflare Pages + Workers + D1 + R2
Home Page: https://rin-docs.xeu.life
License: MIT License
⚡Dynamic blog based on Cloudflare Pages + Workers + D1 + R2
Home Page: https://rin-docs.xeu.life
License: MIT License
Fetching FRONTEND_URL
11 | export class PuppeteerError extends Error {
12 | /**
13 | * @internal
14 | */
15 | constructor(message, options) {
16 | super(message, options);
^
ProtocolError: Protocol error (Page.navigate): Cannot navigate to invalid URL
code: "undefined"
at new PuppeteerError (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js:16:9)
at new ProtocolError (:1:33)
at new Callback (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:93:17)
at create (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:19:26)
at /home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js:161:44
at navigate (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js:159:37)
at /home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js:139:17
at goto (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js:134:20)
at /home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:558:26
at goto (/home/runner/work/Rin/Rin/Rin/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:557:20)
Bun v1.1.12 (Linux x64 baseline)
Error: Process completed with exit code 1.
Bug 描述
上传图片的时候,我看调用了 API_URL 如 https://rin-server.xxxxx.workers.dev/storage 这个接口, 报400 Access Denied错误,然后又调用一次,204 No Content
描述您想要的解决方案
在页面和文章列表显示访问量等信息
顺便感谢这个优秀的项目
您的功能请求是否与问题相关?请描述
目前针对 Rin 的所有配置均通过环境变量实现,足以应对一些简单的配置内容,但是对于一些更加复杂的配置则显得繁琐且不便,因此希望增加动态配置的支持,能够在网页动态修改调整配置
描述您想要的解决方案
考虑到可能会存储诸多键值对,每次 Worker 启动都需要至少读取一次配置,其中可能包含数十个键值对读取请求,而 Cloudflare KV 数据库只提供了与 Workers 请求次数数量相同的每日 100k 次读取限制,不太足够使用(如果我的理解存在偏差欢迎指正)。
而 R2 虽然也有读取次数限制,但是得益于 Cloudflare 强大的 CDN 及其缓存机制,几乎能够实现多次请求只花费少量 R2 读取次数的效果,因此最终考虑将配置文件保存在 R2 而不是 KV 中(但是可能存在用户不使用 R2 而使用别家 S3 存储的情况,这个策略对他们其实不够友好,但是目前还没有更好的解决方案)
描述你考虑过的替代方案
其他信息
Is your feature request related to the problem? Please describe
Currently, tag support is very rudimentary and only supports display, not querying by tag or viewing tag lists
Describe the solution you want
您的功能请求是否与问题相关?请描述
RSS方式,方便聚合
描述您想要的解决方案
描述你考虑过的替代方案
其他信息
Bug 描述
pages 部署失败
复现步骤
按步骤操作
日志
2024-06-07T02:24:04.217763Z Cloning repository...
2024-06-07T02:24:04.854586Z From https://github.com/username/Rin
2024-06-07T02:24:04.855091Z * branch a1e223b285e19b74419af7de57ac7db045cad1fb -> FETCH_HEAD
2024-06-07T02:24:04.855227Z
2024-06-07T02:24:04.893352Z HEAD is now at a1e223b fix: invalid page for spider
2024-06-07T02:24:04.89381Z
2024-06-07T02:24:04.978416Z
2024-06-07T02:24:04.979145Z Using v2 root directory strategy
2024-06-07T02:24:05.003931Z Success: Finished cloning repository files
2024-06-07T02:24:06.568608Z Checking for configuration in a wrangler.toml configuration file (BETA)
2024-06-07T02:24:06.56923Z
2024-06-07T02:24:06.667468Z No wrangler.toml file found. Continuing.
2024-06-07T02:24:07.542274Z Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH
Bug 描述
部分 RSS 客户端需要正确的 content-type: application/rss+xml
响应头,如 https://github.com/FreshRSS/FreshRSS
复现步骤
$ curl -I https://bin.zmide.com/?feed=rss2
HTTP/2 200
server: nginx
date: Thu, 13 Jun 2024 03:57:02 GMT
content-type: application/rss+xml; charset=UTF-8
last-modified: Fri, 07 Jun 2024 13:42:31 GMT
etag: "a1e9a6ed990a9be2dfee53c813b18255"
strict-transport-security: max-age=31536000
$ curl -I https://direct.xeu.life/sub/rss.xml
HTTP/2 404
date: Thu, 13 Jun 2024 03:57:45 GMT
content-type: text/plain;charset=UTF-8
access-control-allow-origin: *
vary: *
access-control-allow-headers: Authorization, content-type
access-control-allow-methods: *
access-control-expose-headers: *
cf-placement: local-LHR
server: cloudflare
cf-ray: 89xxxxxx1417f-LHR
alt-svc: h3=":443"; ma=86400
期望行为
部分 RSS 客户端需要正确的 content-type: application/rss+xml; charset=UTF-8
响应头
截图
nil
环境变量
nil
描述你遇到的问题
部署前端失败
日志
2024-06-20T05:46:46.31048Z Cloning repository...
2024-06-20T05:46:46.922399Z From https://github.com/zkx9527/word
2024-06-20T05:46:46.922842Z * branch 1478353da849914af47637926fcf02dfbec5d223 -> FETCH_HEAD
2024-06-20T05:46:46.922952Z
2024-06-20T05:46:46.951006Z HEAD is now at 1478353 first commit
2024-06-20T05:46:46.951363Z
2024-06-20T05:46:47.034691Z
2024-06-20T05:46:47.035457Z Using v2 root directory strategy
2024-06-20T05:46:47.058587Z Success: Finished cloning repository files
2024-06-20T05:46:48.923653Z Checking for configuration in a wrangler.toml configuration file (BETA)
2024-06-20T05:46:48.92452Z
2024-06-20T05:46:49.021831Z No wrangler.toml file found. Continuing.
2024-06-20T05:46:49.175603Z Running user-defined pre-build script: asdf install bun latest && asdf global bun latest && bun i
2024-06-20T05:46:51.340452Z Downloading Bun v1.1.15...
2024-06-20T05:46:52.423941Z Archive: /tmp/asdf-bun.H5Ad/bun.zip
2024-06-20T05:46:53.16838Z inflating: /opt/buildhome/.asdf/downloads/bun/1.1.15/bun
2024-06-20T05:46:53.226025Z Installing Bun v1.1.15...
2024-06-20T05:46:53.321585Z Bun v1.1.15 is installed successfully!
2024-06-20T05:46:54.187874Z error: Bun could not find a package.json file to install from
2024-06-20T05:46:54.188228Z note: Run "bun init" to initialize a project
2024-06-20T05:46:54.193512Z Error: Exit with error code: 1
2024-06-20T05:46:54.193744Z at ChildProcess. (/snapshot/dist/run-build.js)
2024-06-20T05:46:54.193871Z at Object.onceWrapper (node:events:652:26)
2024-06-20T05:46:54.193975Z at ChildProcess.emit (node:events:537:28)
2024-06-20T05:46:54.19414Z at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2024-06-20T05:46:54.202897Z Failed: build command exited with code: 1
2024-06-20T05:46:54.998819Z Failed: error occurred while running build command
如何更新首页关于about页面,登陆只有写文章,求教
您的功能请求是否与问题相关?请描述
由于目前采用前后端分离的架构,不利于 SEO,希望能够通过一些方法优化收录效果
描述您想要的解决方案
通过 Cloudflare 的规则重写功能将爬虫流量全部导向 Workers 处理,返回一些具有基础结构的内容供爬虫收录
描述你考虑过的替代方案
通过优化前端渲染格式寄希望于 Google 强大的渲染后爬取功能,但似乎并没有爬取到站内的链接
其他信息
欢迎提出更好的解决方案
您的功能请求是否与问题相关?请描述
标签不能很好的起到大类划分的作用,更多用于小板块划分
描述您想要的解决方案
支持分类功能
描述你考虑过的替代方案
其他信息
描述你遇到的问题
Pages 的 Functions 可同时部署前后端,是有别的什么因素考虑所以需要分开部署前后端呢?
复现步骤
期望行为
截图
额外信息
您的功能请求是否与问题相关?请描述
接入 Github OAuth 虽然比较简单,但是如果原生支持账号密码登录将会更加方便部署,同时能够解决部分地区访问 GitHub 缓慢导致难以登录的问题
描述您想要的解决方案
支持账号密码登录
描述你考虑过的替代方案
无
其他信息
同时需要考虑是否增加免登录评论的支持(需要输入一些必须信息)
怎么配置可以在页面底部显示备案号
建议增加时间轴归档页面
文章多了,要进行分类,请问建议使用标签,还是别名?
Bug 描述
部署后,前端已正常显示。点击“github登陆”,转入后端api地址时,网页出现
D1_ERROR: NOT NULL constraint failed: users.username
cf端日志流 都显示“ok”
期望行为
正常登陆
截图
环境变量
您的功能请求是否与问题相关?请描述
当前对话框与提示框均使用浏览器默认提供的 alert 和 confirm,不够美观且体验割裂
描述您想要的解决方案
统一弹窗风格和 api
描述你考虑过的替代方案
其他信息
按照部署手册,搭建了一下
目前的状态是,前端可以访问了,文章是空的,也不知道如何 添加文章
我的前端网址(pages,自定义域名)https://52uvw.xyz
我的后端网址:(workers,自定义域名)https://servers.52uvw.xyz
前后端的cloudflare域名(非定义域名)分别为:
前端:rin-56k.pages.dev
后端:rin-server.hwhtj.workers.dev
根据部署文档,提到
“配置 GitHub Action
在自己 fork 的仓库中 > Settings > Secrets and Variables > Actions > Repository secrets 点击 New repository secret 创建以下两个密钥:
CLOUDFLARE_ACCOUNT_ID=<你的用户ID>
CLOUDFLARE_API_TOKEN=<你的令牌>
同时你可以在Actions secrets and variables的 Variables 中创建以下变量:
DB_NAME=<数据库名称,默认rin>
WORKER_NAME=<Cloudflare Worker 名称,默认rin-server>”
这里的“rin-server”是指文档前面提到的在Pages中创建的rin?还是指需要在Workers新创建rin-server的项目?
描述你遇到的问题
复现步骤
依教程部署完毕,
期望行为
截图
额外信息
接入 Github OAuth这部分,后端地址是从哪里获取的?目前是卡到这里了
您的功能请求是否与问题相关?请描述
目前友链添加后无法二次编辑于删除
描述您想要的解决方案
添加编辑与删除功能
描述你考虑过的替代方案
其他信息
后端的变量,全部添加了,检查了几遍还是这样,
前端点github登陆就提示无法处理此请求。HTTP ERROR 500,好像无法https加密访问呢。
github也创建了应用返回地址,KEY也加到了后端变量,不知道哪里出问题了。
完全按视频操作的,在github加了5个配置:RIN_GITHUB_CLIENT_ID,RIN_GITHUB_CLIENT_SECRET,JWT_SECRET,CLOUDFLARE_ACCOUNT_ID,CLOUDFLARE_API_TOKEN,手动触发Workflow部署完成,访问后端地址,直接无响应(视频中是返回了一个hi 显示在页面)。
请问这个和缺少配置无关吧?视频中作者您也没加S3_BUCKET和S3_REGION这几个配置项,另外如果要加,那么 “然后在公开访问处绑定一个域名用于访问资源,绑定的域名对应于S3_ACCESS_HOST环境变量,S3_ACCESS_HOST=https://image.xeu.life” ,这个S3_ACCESS_HOST绑定的域名是需要自己购买的域名?
Requirement
添加这两个变量,提示不让添加以GITHUB开头的变量,只能到cf上添加吗
GITHUB_CLIENT_ID=<你的GithubClientID>
GITHUB_CLIENT_SECRET=<你的GithubClientSecret>
希望可以支持批量导入数据,方便迁移博客。
附件是从Wordpress导出的XML文件,包括了分类、标签、文章、评论等数据。
非常感谢!
chentao1006.wordpress.com-2024-06-08-01_00_51-9ajuquistbf8tch7qpclkec2asruqaus.zip
您的功能请求是否与问题相关?请描述
描述您想要的解决方案
自动保存修订记录,同时可设置是否仅自己可见修订记录
描述你考虑过的替代方案
其他信息
您的功能请求是否与问题相关?请描述
当前网站图标是通过 client/public/favicon.png
确定的。
描述您想要的解决方案
希望通过 https://wsrv.nl/ 将 AVATAR
处理为圆形,并且将圆形外的部分设为透明背景,作为网站图标。
描述你考虑过的替代方案
其他信息
我在自己fork的仓库中,应该如何操作,才能”在 GitHub Action 中手动触发一次 Workflow“
描述你遇到的问题
前后端正常部署
已在pages设置自定义域
通过自定义域点击"github登录"后转到后端domain/user/github
显示 Referer not found
在使用pages自动分配的域名登录一切正常
您的功能请求是否与问题相关?请描述
描述您想要的解决方案
正文侧边目录支持
描述你考虑过的替代方案
其他信息
这家在其他软件中需要选中强制路径样式,是否和这个有关系
描述你遇到的问题
复现步骤
代码已升到最新并正常部署,前后端,访问正常;
R2里已生成了rss.xml等文件
已按文档 设置路由/sub/*指向Rin Worker。
访问 域名/sub/rss.xml时,提示404
Error 404
This object could not be viewed
You are not authorized to view this object
This object does not exist or is not publicly accessible at this URL. Check the URL of the object that you're looking for or contact the owner to enable Public access.
但使用 S3_ACCESS_HOST 能访问到rss.xml文件
S3_ACCESS_HOST/桶名/cache/rss.xml
期望行为
截图
额外信息
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.