ow in bottles draft

This commit is contained in:
Lio 2023-05-27 06:04:07 +02:00
parent b0c57f4cd8
commit aa999243e7
2 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,7 @@
---
title: Mouse losing focus in Overwatch 2 on Linux
title: "Mouse losing focus in Overwatch 2 on Linux"
date: [2023, 03, 11]
hidden: true
---
# Mouse losing focus in Overwatch 2 on Linux

View file

@ -13,10 +13,12 @@ import Head from "next/head";
import matter from "gray-matter";
const Post = (props: { post: string, slug: string, matter: any }) => {
// console.log(props.matter)
let Index = (
<main id={index.layout}>
<Head>
<title>{props.matter.title}</title>
<title>{props.matter}</title>
</Head>
<Sidebar />
<section id={index.main}>
@ -48,7 +50,7 @@ export async function getStaticProps(context: any) {
.process(await read(`${listFiles('./src/blog').find(file => file.includes(context.params.slug))}`))
return {
props: {
post: (post.value as string).replace(/(---)\n*([a-zA-Z0-9\/\[\]_:,\-\s*]*)*/mi, ""),
post: (post.value as string).replace(/(---)\n*([a-zA-Z0-9\/\[\]\"_:,\-\s*]*)*/mi, ""),
matter: matter(post.value).data,
slug: context.params.slug
}
@ -59,6 +61,7 @@ export async function getStaticProps(context: any) {
export async function getStaticPaths() {
let path = './src/blog'
let paths = listFiles(path).map(file => file.replace(path, "/blog").replace(/.mdx?/gmi, ''))
// console.log(paths)
return {
paths,
fallback: true