-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(plugin-content-blog): remove ts build
- Loading branch information
Showing
6 changed files
with
26 additions
and
7,700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const blogPluginExports = require('@docusaurus/plugin-content-blog'); | ||
const { default: blogPlugin } = blogPluginExports; | ||
|
||
async function blogPluginEnhanced(context, options) { | ||
const blogPluginInstance = await blogPlugin(context, options); | ||
|
||
return { | ||
...blogPluginInstance, | ||
async contentLoaded({ content, allContent, actions }) { | ||
// Create default plugin pages | ||
await blogPluginInstance.contentLoaded({ content, allContent, actions }); | ||
|
||
// Create your additional pages | ||
const { blogPosts, blogTags } = content; | ||
const { setGlobalData } = actions; | ||
|
||
setGlobalData({ | ||
blogs: blogPosts, | ||
tags: blogTags, | ||
}); | ||
}, | ||
}; | ||
} | ||
|
||
module.exports = Object.assign({}, blogPluginExports, { default: blogPluginEnhanced }); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
12ca38e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
blog – ./
blog-kuizuo1.vercel.app
blog-kuizuo.vercel.app
blog-git-main-kuizuo1.vercel.app
kuizuo.cn