mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-31 07:18:59 +02:00
feat(v2): create docusaurus-content-blog plugin draft
This commit is contained in:
parent
211e04f409
commit
e5b7daef33
8 changed files with 95 additions and 41 deletions
|
@ -18,8 +18,8 @@ const REQUIRED_FIELDS = [
|
|||
'headerIcon',
|
||||
'organizationName',
|
||||
'projectName',
|
||||
'title',
|
||||
'tagline',
|
||||
'title',
|
||||
'url',
|
||||
];
|
||||
|
||||
|
@ -34,6 +34,7 @@ const OPTIONAL_FIELDS = [
|
|||
'githubHost',
|
||||
'highlight',
|
||||
'markdownPlugins',
|
||||
'plugins',
|
||||
];
|
||||
|
||||
const DEFAULT_CONFIG = {
|
||||
|
@ -94,12 +95,12 @@ function loadConfig(siteDir, deleteCache = true) {
|
|||
}
|
||||
config.headerLinks = headerLinks;
|
||||
|
||||
/*
|
||||
User's own array of custom fields,
|
||||
e.g: if they want to include some field so they can access it later from `props.siteConfig`
|
||||
*/
|
||||
// User's own array of custom fields/
|
||||
// e.g: if they want to include some.field so they can access it later from `props.siteConfig`.
|
||||
const {customFields = []} = config;
|
||||
|
||||
// TODO: Check that plugins mentioned exist.
|
||||
|
||||
// Don't allow unrecognized fields.
|
||||
const allowedFields = [
|
||||
...REQUIRED_FIELDS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue