Giter VIP home page Giter VIP logo

issues-json-friends's Introduction

Issues-Json Generator

自动提取本仓库 issues 中第一段 JSON 代码块并保存到仓库中,解决了直接调用 GitHub API 频率有限制以及速度过慢的问题。(你可以通过其它 N 种方式访问仓库文件)

例如动态友链:https://github.com/xaoxuu/friends

随意发挥你的创意吧~

本项目基于 IJGP v1 协议

使用方法

  1. fork 本仓库,把 config.yml 配置改为自己的:
issues:
  repo: xaoxuu/friends # 仓库持有者/仓库名
  label: active  # 只能配置1个或留空,留空则所有open的issue都会被抓取。配置1个时,issue只有在具有该标签时才被抓取
  groups: # 填写用来分组的label名称。留空则所有被抓取的issue输出至data.json,否则按照输出与组名同名的json文件
  sort: updated-desc # 排序,按最近更新,取消此项则按创建时间排序

配置实例说明如下

label groups 输出文件 抓取issue
label: active groups: data.json 所有open的、label包含active的issue
label: active groups: ["ordinary", "top"] ordinary.json, top.json open的、label包含active且包含ordinary或top的issue
label: groups: data.json 所有open的issue
label: groups: ["ordinary", "top"] ordinary.json, top.json open的、label包含ordinary或top的issue
  1. 打开 action 运行权限。

测试是否配置成功

  1. 新建 issue 并按照模板要求填写提交。
  2. 等待 Action 运行完毕,检查 output 分支是否有 /v2/data.json 文件或/v2/<组名>.json,内容是否正确,如果正确则表示已经配置成功。

IJGP 协议

IJGP 全称为 Issues-Json Generator Protocol,本协议目的在于减少重复造轮子和碎片化,改善大家跨项目使用体验。

在设计工具时,在满足如下场景的需求的地方需要使用与之对应的字段名:

v1

字段 类型 用途
title string 主标题
url string 主链接
avatar string 头像链接
description string 描述,建议200字以内
keywords string 关键词,英文逗号隔开
screenshot string 屏幕截图
{
  "content": [
    {
      "title": "",
      "url": "",
      "avatar": "",
      ...
    }
    ...
  ]
}

v2(修订中,暂未发布)

相比 v1 版本,缩略图字段发生变动,且数据增加 ijgp 字段用来表示使用的协议版本。

字段 类型 用途
title string 主标题
url string 主链接
avatar string 头像链接
description string 描述,建议200字以内
keywords string 关键词,英文逗号隔开
thumbnail string 缩略图(旧版的“屏幕截图”含义不明)
{
  "ijgp": "v2",
  "data": [
    {
      "title": "",
      "url": "",
      "avatar": "",
      ...
    }
    ...
  ]
}

如何使用协议

协议会根据需要增加新的字段,但已有字段不会更改,如需更改,将会创建新的协议版本,这样使用同一个版本协议的所有前后端输出和得到的数据字段都是一致的。

例如网站需要显示只有头像和昵称的极简友链,那么模板可以配置为:

{
  "title": "",
  "url": "",
  "avatar": ""
}

例如希望显示友链关键词、描述,那么模板可以配置为:

{
  "title": "",
  "url": "",
  "avatar": "",
  "keywords": "",
  "description": ""
}

例如带有缩略图的网站收藏夹,那么模板可以配置为:

{
  "title": "",
  "url": "",
  "avatar": "",
  "thumbnail": ""
}

前端(数据使用端)只需要根据实际需要,依据协议中的字段进行读取和显示。

issues-json-friends's People

Contributors

infinitesum avatar xaoxuu avatar weekdaycare avatar

issues-json-friends's Issues

张洪Heo

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "张洪Heo",
    "url": "https://blog.zhheo.com/",
    "avatar": "https://bu.dusays.com/2022/12/28/63ac2812183aa.png",
    "screenshot": "",
    "description": "分享设计与科技生活"
}

友链地址

https://blog.zhheo.com/link/

友链仓库(可选)

No response

Achuan-2

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "Achuan-2",
    "url": "https://achuan-2.github.io/",
    "avatar": "https://fastly.jsdelivr.net/gh/Achuan-2/Picbed@pic/assets/1666805474234Achuan.jpg",
    "screenshot": "https://fastly.jsdelivr.net/gh/Achuan-2/Picbed@pic/assets/1666805527244Snipaste_2022-10-27_01-31-59.png",
    "description": "一条没有故事的巛",
    "keywords": "生物信息, 编程"
}

友链地址

1

友链仓库(可选)

No response

星日语

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "星日语",
    "url": "https://weekdaycare.cn",
    "avatar": "https://weekdaycare.cn/asset/avatar.svg",
    "screenshot": "",
    "description": "星语日点灯",
    "note": "建站过程语佬贡献了很多 insight!(激动)写代码好厉害人也好好"
}

友链地址

https://weekdaycare.cn/about/

友链仓库(可选)

https://github.com/weekdaycare/friends/issues

小孙同学

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "小孙同学",
    "url": "https://blog.sunguoqi.com",
    "avatar": "https://blog.sunguoqi.com/avatar.webp",
    "screenshot": "",
    "description": "路虽远行则将至,事虽难做则必成!"
}

友链地址

https://blog.sunguoqi.com/link/#%E6%88%91%E7%9A%84%E5%8F%8B%E9%93%BE

友链仓库(可选)

No response

Thun888

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "Thun888's Blog",
    "url": "https://blog.hzchu.top/",
    "avatar": "https://blog.hzchu.top/img/avatar.webp",
    "screenshot": "https://onep.hzchu.top/mount/pic/blog-hzchu-top.png",
    "description": "夏日当空,心如深渊",
    "note": "超级厉害的大佬!很多工具安利> <"
}

友链地址

https://blog.hzchu.top/friends/

友链仓库(可选)

No response

Jun

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "Jun",
    "url": "https://lingjun.life/",
    "avatar": "https://lingjun.life/images/avatar.jpg",
    "screenshot": "",
    "description": "无限进步"
}

友链地址

https://lingjun.life/links/

友链仓库(可选)

No response

宇宙尽头的餐馆

检查清单

  • 合法的、非营利性、无商业广告、无木马植入。
  • 有实质性原创内容的 HTTPS 站点,发布过至少 5 篇原创文章,内容题材不限。
  • 有独立域名,非免费域名。
  • 博客已运行至少半年,非刚搭建好。
  • 博主 有至少 5 次有效互动(有内容的留言或者 issue 等)。

友链信息

{
    "title": "宇宙尽头的餐馆",
    "url": "https://flyalready.cn/",
    "avatar": "https://flyalready.cn/asset/images/avatar.jpg",
    "screenshot": "https://flyalready.cn/asset/images/screenshot.png",
    "description": "自你离开,我辗转难眠",
    "note": "测试一下备注信息"
}

友链地址

https://infinitesum.github.io/friends/

友链仓库(可选)

No response

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.