Revert "[#781,blog][s]: /blog will now list files in content/docs when filetype is equal to 'blog'"
This reverts commit 92316d4680ef966dc6f448f557ea5f10ff4e540a.
This commit is contained in:
parent
110360ccae
commit
b38ea26f82
@ -21,17 +21,6 @@ export async function getStaticProps() {
|
||||
extensions: ['md', 'mdx'],
|
||||
});
|
||||
|
||||
// Temporary, while MarkdownDB doesn't support filetypes
|
||||
// Merges docs that have the "blog" filetype
|
||||
let docs = await mddb.getFiles({
|
||||
folder: 'docs',
|
||||
extensions: ['md', 'mdx'],
|
||||
});
|
||||
|
||||
docs = docs.filter((doc) => doc.metadata.filetype === 'blog');
|
||||
|
||||
blogs = [...blogs, ...docs];
|
||||
|
||||
const blogsSorted = blogs.sort(
|
||||
(a, b) =>
|
||||
new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user