fix twitter and github post links
This commit is contained in:
@ -76,6 +76,7 @@ export async function getFileBySlug(type, slug) {
|
||||
wordCount: content.split(/\s+/gu).length,
|
||||
readingTime: readingTime(content),
|
||||
slug: slug || null,
|
||||
fileName: fs.existsSync(mdxPath) ? `${slug}.mdx` : `${slug}.md`,
|
||||
...data,
|
||||
},
|
||||
}
|
||||
@ -87,7 +88,6 @@ export async function getAllFilesFrontMatter(type) {
|
||||
const allFrontMatter = files.reduce((allPosts, postSlug) => {
|
||||
const source = fs.readFileSync(path.join(root, 'data', type, postSlug), 'utf8')
|
||||
const { data } = matter(source)
|
||||
|
||||
return [
|
||||
{
|
||||
...data,
|
||||
|
Reference in New Issue
Block a user