GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mokeyjay/Pixiv-daily-ranking-widget: 会自动更新的P站每日榜小挂件,适合放在博客侧边栏等地方 Pixiv daily ranking widget, automatically updates, suitable for blog sidebar, etc.

BranchesTags
Open more actions menu

Latest commit

 

History

202 Commits
202 Commits

Folders and files

NameName
Last commit message
Last commit date
.docker
.docker
 
 
.github/workflows
.github/workflows
 
 
.test
.test
 
 
app
app
 
 
doc
doc
 
 
storage
storage
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.en.md
README.en.md
 
 
README.md
README.md
 
 
config.php
config.php
 
 
demo.html
demo.html
 
 
index.php
index.php
 
 

Repository files navigation

🖼️ Pixiv 每日排行榜小挂件

English

想要在你的网站页面中添加一个 Pixiv 每日排行榜 的展示功能吗?现在,只需要一行代码即可实现! 在线预览

✨ 特色

  • 一行 HTML 代码即可调用,方便快捷
  • 自适应宽高。推荐宽度 240px、高度 380px 或以上
  • 点击图片可跳转到对应作品详情页
  • 每日自动更新,无需人工干预
  • 内置多图床支持、按需加载图片,极低资源消耗
  • 提供 API 服务,含有排行榜更新日期、缩略图 url 及详情页 url 等

🤔 如何使用

将这行代码添加到网页上即可

<iframe src="https://pixiv.mokeyjay.com" style="width:240px; height:380px; border: 0"></iframe>

以 Wordpress 为例。首先进入后台,点击 外观 -> 小工具
向右边适当的位置添加一个 文本 或 自定义HTML 小工具,内容填写上述代码即可

高级用法

🛠️ 如何部署

想要自己定制代码?嫌我提供的服务太慢?
你也可以轻松拥有完全属于自己的小挂件!

需要 Docker 或 PHP 版本 >= 5.6

部署文档

🔌 API

排行榜数据(已上传至图床)(推荐)
排行榜数据(pixiv url)

其中 data 为排行榜数据;date 为排行榜日期(可能是昨天或者前天,因为官方更新时间不一定)
这两个接口都会自动根据请求头的 Origin 或者 Referer 返回对应跨域头。可供前端直接调用

image 和 url 两个键是为了兼容 4.x 及之前版本的用户,无需理会

🆙 升级指南

从 5.2 升级到 6.0

  1. 下载源代码
  2. 解压缩,将其中的 app 和 index.php 覆盖到线上环境

⚠️ 对于 Docker 方式部署的用户

  • 请将环境变量名中所有 - 替换为 _
  • 镜像从 docker hub 迁移至 ghcr.io

🌟 更新日志

新增

  • ranking_type 配置项,现在可以选择拉取综合还是插画、漫画日榜啦~
  • 图片预加载,优化网络环境较差时的体验

优化

  • 完全重写了前端,更优雅的缓动效果
  • 不再依赖 bootstrap,加载更快啦
  • 改为使用官方 php、nginx 包
  • 从本地存储获取图片时不再重复检查完整性
  • background_color 配置项现在支持更多种颜色了

修复

  • 部分环境变量在一些情况下无法被正常获取的问题
  • 定时任务实际上是一小时执行一次,而非文档说的半小时一次

其他

  • 由于不再依赖 bs,去除 static_cdn 配置项
  • 删除已经失效的 Pngcm、Tsesze 图床
  • Docker 镜像迁移至 ghcr.io
  • Docker 镜像时区默认为上海

历史更新日志

👨‍💻 关于作者

常用 ID mokeyjay,热爱 IT 与 ACG 的学渣

About

会自动更新的P站每日榜小挂件,适合放在博客侧边栏等地方 Pixiv daily ranking widget, automatically updates, suitable for blog sidebar, etc.

mok.moe/p/pixiv-daily-ranking

Resources

Readme
MIT license
Activity

Stars

295 stars

Watchers

5 watching

Forks

33 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.