ow in bottles draft
This commit is contained in:
parent
b0c57f4cd8
commit
aa999243e7
2 changed files with 7 additions and 3 deletions
|
@ -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]
|
date: [2023, 03, 11]
|
||||||
|
hidden: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# Mouse losing focus in Overwatch 2 on Linux
|
# Mouse losing focus in Overwatch 2 on Linux
|
||||||
|
|
|
@ -13,10 +13,12 @@ import Head from "next/head";
|
||||||
import matter from "gray-matter";
|
import matter from "gray-matter";
|
||||||
const Post = (props: { post: string, slug: string, matter: any }) => {
|
const Post = (props: { post: string, slug: string, matter: any }) => {
|
||||||
|
|
||||||
|
// console.log(props.matter)
|
||||||
|
|
||||||
let Index = (
|
let Index = (
|
||||||
<main id={index.layout}>
|
<main id={index.layout}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{props.matter.title}</title>
|
<title>{props.matter}</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<section id={index.main}>
|
<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))}`))
|
.process(await read(`${listFiles('./src/blog').find(file => file.includes(context.params.slug))}`))
|
||||||
return {
|
return {
|
||||||
props: {
|
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,
|
matter: matter(post.value).data,
|
||||||
slug: context.params.slug
|
slug: context.params.slug
|
||||||
}
|
}
|
||||||
|
@ -59,6 +61,7 @@ export async function getStaticProps(context: any) {
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
let path = './src/blog'
|
let path = './src/blog'
|
||||||
let paths = listFiles(path).map(file => file.replace(path, "/blog").replace(/.mdx?/gmi, ''))
|
let paths = listFiles(path).map(file => file.replace(path, "/blog").replace(/.mdx?/gmi, ''))
|
||||||
|
// console.log(paths)
|
||||||
return {
|
return {
|
||||||
paths,
|
paths,
|
||||||
fallback: true
|
fallback: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue