通过json生成site-card
发表于:2023-03-19 | 分类: 标签 json
字数统计: 502 | 阅读时长: 2分钟 | 阅读量:

支持v3.2.2+ 通过本地(source文件夹下)或者远程json文件,生成site-card标签集

json文件格式如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://picx.zhimg.com/80/v2-d7666d074ec59ca4cf14f15c5f891643_1440w.webp",
"description": "hexo主题bamboo"
},
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://pic1.zhimg.com/80/v2-d27db7c61bbe3ecb8d493d31bf835b28_1440w.webp",
"description": "hexo主题bamboo"
},
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://picx.zhimg.com/80/v2-17001eba7a69aea9477299f8140e12ab_1440w.webp",
"description": "hexo主题bamboo"
},
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://picx.zhimg.com/80/v2-3486dae2687982e8a141c23d922b9936_1440w.webp",
"description": "hexo主题bamboo"
},
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://pic1.zhimg.com/80/v2-034e77303e502886d0ea6130f44127ed_1440w.webp",
"description": "hexo主题bamboo"
},
{
"title": "yuang01",
"url": "https://hexo-theme-bamboo.netlify.app/",
"avatar": "https://hexo-theme-bamboo.netlify.app/img/avatar.jpg",
"screenshot": "https://picx.zhimg.com/80/v2-1781005004b2681e722e68aab7bf68c3_1440w.webp",
"description": "hexo主题bamboo"
}
]

url 字段可以替换为href字段,表示要跳转的地址
title 字段可以替换为name,表示名称
avatar 字段可以替换为touxiang,表示头像
screenshot 字段可以替换为cover,表示封面图片
description 字段可以替换为desc,表示描述

例如: https://yuang01.github.io/myjson/site.json

本地

写法

1
{% getSiteOnline /myjson/site.json %}

jsdelivr远程

写法

1
{% getSiteOnline https://cdn.jsdelivr.net/gh/yuang01/CDN@main/file/site.json %}

github远程

写法

1
{% getSiteOnline https://yuang01.github.io/myjson/site.json %}
上一篇:
通过json生成talk-card
下一篇:
通过json生成图片集