feat(route): add xunhupay (#11616)
This commit is contained in:
@@ -244,6 +244,12 @@ username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog
|
||||
|
||||
</Route>
|
||||
|
||||
## 虎皮椒
|
||||
|
||||
### 文章
|
||||
|
||||
<Route author="wxluckly" example="/xunhupay/blog" path="/xunhupay/blog" radar="1"/>
|
||||
|
||||
## 華康字型故事
|
||||
|
||||
### 博客
|
||||
|
||||
@@ -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'),
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/blog': ['Joey'],
|
||||
};
|
||||
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function (router) {
|
||||
router.get('/blog', require('./index'));
|
||||
};
|
||||
Reference in New Issue
Block a user