diff --git a/docs/blog.md b/docs/blog.md index 7de472712..c95573873 100644 --- a/docs/blog.md +++ b/docs/blog.md @@ -244,6 +244,12 @@ username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog +## 虎皮椒 + +### 文章 + + + ## 華康字型故事 ### 博客 diff --git a/lib/v2/xunhupay/index.js b/lib/v2/xunhupay/index.js new file mode 100644 index 000000000..f2d4e3ba4 --- /dev/null +++ b/lib/v2/xunhupay/index.js @@ -0,0 +1,24 @@ +const buildData = require('@/utils/common-config'); +const baseUrl = 'https://www.xunhupay.com'; + +module.exports = async (ctx) => { + const link = `${baseUrl}/blog.html`; + ctx.state.data = await buildData({ + link, + url: link, + title: `%title%`, + description: `%description%`, + params: { + title: '博客', + description: '虎皮椒-博客', + }, + item: { + item: '.blog-post > article', + title: `$('h5').text()`, + link: `$('a').attr('href')`, + description: `$('.content').text()`, + pubDate: `parseDate($('.date').text(), 'YYYY-MM-DD')`, + guid: Buffer.from(`$('a').attr('href')`).toString('base64'), + }, + }); +}; diff --git a/lib/v2/xunhupay/maintainer.js b/lib/v2/xunhupay/maintainer.js new file mode 100644 index 000000000..97396030b --- /dev/null +++ b/lib/v2/xunhupay/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/blog': ['Joey'], +}; diff --git a/lib/v2/xunhupay/radar.js b/lib/v2/xunhupay/radar.js new file mode 100644 index 000000000..3873c0316 --- /dev/null +++ b/lib/v2/xunhupay/radar.js @@ -0,0 +1,13 @@ +module.exports = { + 'xunhupay.com': { + _name: '虎皮椒', + www: [ + { + title: '博客', + docs: 'https://docs.rsshub.app/blog.html#hu-pi-jiao', + source: ['/blog'], + target: '/xunhupay/blog', + }, + ], + }, +}; diff --git a/lib/v2/xunhupay/router.js b/lib/v2/xunhupay/router.js new file mode 100644 index 000000000..996a5f32f --- /dev/null +++ b/lib/v2/xunhupay/router.js @@ -0,0 +1,3 @@ +module.exports = function (router) { + router.get('/blog', require('./index')); +};