mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-16 07:44:44 +08:00
feat(route)!: remove watasuke.net (#18095)
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import markdownit from 'markdown-it';
|
||||
|
||||
import { Route } from '@/types';
|
||||
|
||||
const handler = async () => {
|
||||
const baseUrl = 'https://watasuke.net';
|
||||
const apiUrl = `${baseUrl}/page-data/blog/page-data.json`;
|
||||
const response = await got(apiUrl);
|
||||
const md = markdownit({ linkify: true, breaks: true });
|
||||
const articles = response.data.result.data.allArticles.nodes.map((node) => ({
|
||||
title: node.title,
|
||||
description: md.render(node.body),
|
||||
pubDate: parseDate(node.published_at),
|
||||
updated: parseDate(node.updated_at),
|
||||
link: `${baseUrl}/blog/article/${node.slug}/`,
|
||||
category: node.tags.map((tag) => tag.name),
|
||||
}));
|
||||
|
||||
return {
|
||||
title: 'ブログ - わたすけのへや',
|
||||
link: `${baseUrl}/blog/`,
|
||||
item: articles,
|
||||
language: 'ja',
|
||||
icon: `${baseUrl}/icons/icon-512x512.png`,
|
||||
logo: `${baseUrl}/icons/icon-512x512.png`,
|
||||
};
|
||||
};
|
||||
export const route: Route = {
|
||||
path: '/blog',
|
||||
example: '/watasuke/blog',
|
||||
radar: [
|
||||
{
|
||||
source: ['watasuke.net/blog/', 'watasuke.net/'],
|
||||
},
|
||||
],
|
||||
name: 'Blog',
|
||||
maintainers: ['honahuku'],
|
||||
handler,
|
||||
url: 'watasuke.net/blog/',
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
import type { Namespace } from '@/types';
|
||||
|
||||
export const namespace: Namespace = {
|
||||
name: 'Watasuke',
|
||||
url: 'watasuke.net',
|
||||
categories: ['blog'],
|
||||
lang: 'ja',
|
||||
};
|
||||
Reference in New Issue
Block a user