Skip to content

Commit

Permalink
fix(api): return as text/plain
Browse files Browse the repository at this point in the history
  • Loading branch information
taskylizard committed Jul 31, 2024
1 parent 2d746a8 commit e60e052
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export default defineConfig({
{ text: 'Posts', link: '/posts' },
{ text: 'Feedback', link: '/feedback' },
{ text: 'snowbin', link: 'https://pastes.fmhy.net' },
{ text: 'SearXNG', link: 'https://searx.fmhy.net/'},
{ text: 'Whoogle', link: 'https://whoogle.fmhy.net/'}
{ text: 'SearXNG', link: 'https://searx.fmhy.net/' },
{ text: 'Whoogle', link: 'https://whoogle.fmhy.net/' }
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/hooks/opengraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ async function generateImage({
props: {
title:
frontmatter.layout === 'home'
? frontmatter.hero.name ?? frontmatter.title
? (frontmatter.hero.name ?? frontmatter.title)
: frontmatter.title,
description:
frontmatter.layout === 'home'
? frontmatter.hero.tagline ?? frontmatter.description
? (frontmatter.hero.tagline ?? frontmatter.description)
: frontmatter.description
}
}
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/hooks/rss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function generateFeed(config: SiteConfig): Promise<void> {
id: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`,
link: `${meta.hostname}${url.replace(/\/\d+\./, '/')}`,
date: frontmatter.date,
content: html?.replaceAll('&ZeroWidthSpace;', ''),
content: html?.replaceAll('&ZeroWidthSpace;', '')
})
}

Expand Down
8 changes: 5 additions & 3 deletions .vitepress/routes/single-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ interface File {
}
}

export default defineEventHandler(async () => {
let body = ''
export default defineEventHandler(async (event) => {
let body = '<!-- This is autogenerated content, do not edit manually. -->\n'
const f = fetcher({
headers: {
'User-Agent': 'taskylizard'
Expand All @@ -44,7 +44,7 @@ export default defineEventHandler(async () => {
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
const contents = await Promise.all(
Expand All @@ -62,5 +62,7 @@ export default defineEventHandler(async () => {
}
}

// biome-ignore lint/correctness/noUndeclaredVariables: <explanation>
appendResponseHeader(event, 'content-type', 'text/plain')
return body
})
20 changes: 12 additions & 8 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@
*/
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg,
#c4b5fd 30%,
#7bc5e4);

--vp-home-hero-image-background-image: linear-gradient(-45deg,
#c4b5fd 50%,
#47caff 50%);
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#c4b5fd 30%,
#7bc5e4
);

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#c4b5fd 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}

Expand Down Expand Up @@ -232,7 +236,7 @@
}
}

#VPContent strong>a {
#VPContent strong > a {
font-weight: bold;
}

Expand Down

0 comments on commit e60e052

Please sign in to comment.