fix(api): return as text/plain

This commit is contained in:
taskylizard 2024-07-31 16:48:06 +00:00
parent 2d746a86de
commit e60e05270c
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
5 changed files with 21 additions and 15 deletions

View file

@ -100,8 +100,8 @@ export default defineConfig({
{ text: 'Posts', link: '/posts' }, { text: 'Posts', link: '/posts' },
{ text: 'Feedback', link: '/feedback' }, { text: 'Feedback', link: '/feedback' },
{ text: 'snowbin', link: 'https://pastes.fmhy.net' }, { text: 'snowbin', link: 'https://pastes.fmhy.net' },
{ text: 'SearXNG', link: 'https://searx.fmhy.net/'}, { text: 'SearXNG', link: 'https://searx.fmhy.net/' },
{ text: 'Whoogle', link: 'https://whoogle.fmhy.net/'} { text: 'Whoogle', link: 'https://whoogle.fmhy.net/' }
] ]
} }
], ],

View file

@ -74,11 +74,11 @@ async function generateImage({
props: { props: {
title: title:
frontmatter.layout === 'home' frontmatter.layout === 'home'
? frontmatter.hero.name ?? frontmatter.title ? (frontmatter.hero.name ?? frontmatter.title)
: frontmatter.title, : frontmatter.title,
description: description:
frontmatter.layout === 'home' frontmatter.layout === 'home'
? frontmatter.hero.tagline ?? frontmatter.description ? (frontmatter.hero.tagline ?? frontmatter.description)
: frontmatter.description : frontmatter.description
} }
} }

View file

@ -40,7 +40,7 @@ export async function generateFeed(config: SiteConfig): Promise<void> {
id: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`, id: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`,
link: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`, link: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`,
date: frontmatter.date, date: frontmatter.date,
content: html?.replaceAll('&ZeroWidthSpace;', ''), content: html?.replaceAll('&ZeroWidthSpace;', '')
}) })
} }

View file

@ -21,8 +21,8 @@ interface File {
} }
} }
export default defineEventHandler(async () => { export default defineEventHandler(async (event) => {
let body = '' let body = '<!-- This is autogenerated content, do not edit manually. -->\n'
const f = fetcher({ const f = fetcher({
headers: { headers: {
'User-Agent': 'taskylizard' 'User-Agent': 'taskylizard'
@ -44,7 +44,7 @@ export default defineEventHandler(async () => {
return isMarkdownFile && !isExcludedFile && !isInExcludedDirectory return isMarkdownFile && !isExcludedFile && !isInExcludedDirectory
}) })
// console.info(markdownFiles.map((f) => f.name)) console.info(markdownFiles.map((f) => f.name))
// Fetch and concatenate the contents of the markdown files // Fetch and concatenate the contents of the markdown files
const contents = await Promise.all( const contents = await Promise.all(
@ -62,5 +62,7 @@ export default defineEventHandler(async () => {
} }
} }
// biome-ignore lint/correctness/noUndeclaredVariables: <explanation>
appendResponseHeader(event, 'content-type', 'text/plain')
return body return body
}) })

View file

@ -120,13 +120,17 @@
*/ */
:root { :root {
--vp-home-hero-name-color: transparent; --vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, --vp-home-hero-name-background: -webkit-linear-gradient(
#c4b5fd 30%, 120deg,
#7bc5e4); #c4b5fd 30%,
#7bc5e4
);
--vp-home-hero-image-background-image: linear-gradient(-45deg, --vp-home-hero-image-background-image: linear-gradient(
#c4b5fd 50%, -45deg,
#47caff 50%); #c4b5fd 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px); --vp-home-hero-image-filter: blur(44px);
} }
@ -232,7 +236,7 @@
} }
} }
#VPContent strong>a { #VPContent strong > a {
font-weight: bold; font-weight: bold;
} }