feat(route): add xunhupay (#11616)

This commit is contained in:
joey
2023-01-13 19:38:31 +08:00
committed by GitHub
parent 4e7c633dc2
commit 5812d70ac8
5 changed files with 49 additions and 0 deletions
+6
View File
@@ -244,6 +244,12 @@ username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog
</Route>
## 虎皮椒
### 文章
<Route author="wxluckly" example="/xunhupay/blog" path="/xunhupay/blog" radar="1"/>
## 華康字型故事
### 博客
+24
View File
@@ -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'),
},
});
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
'/blog': ['Joey'],
};
+13
View File
@@ -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',
},
],
},
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/blog', require('./index'));
};