mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-05 19:07:48 +02:00
refactor: remove deprecated docs homePageId option (#6065)
This commit is contained in:
parent
c64987e2c8
commit
f96a051fbe
17 changed files with 96 additions and 175 deletions
|
@ -37,7 +37,6 @@ module.exports = {
|
|||
'@docusaurus/preset-classic',
|
||||
{
|
||||
docs: {
|
||||
homePageId: 'installation',
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/main/docs/',
|
||||
|
@ -53,7 +52,7 @@ module.exports = {
|
|||
title: 'Docusaurus',
|
||||
logo: {src: 'img/docusaurus.svg'},
|
||||
items: [
|
||||
{to: 'docs/', label: 'Docs', position: 'left'},
|
||||
{to: 'docs/installation', label: 'Docs', position: 'left'},
|
||||
{to: 'docs/tutorial-setup', label: 'Tutorial', position: 'left'},
|
||||
{to: '/users', label: 'Users', position: 'left'},
|
||||
{
|
||||
|
|
|
@ -226,9 +226,6 @@ export function createConfigFile({
|
|||
'v1Config' | 'siteDir' | 'newDir'
|
||||
>): VersionTwoConfig {
|
||||
const siteConfig = v1Config;
|
||||
const homePageId = siteConfig.headerLinks?.filter((value) => value.doc)[0]
|
||||
.doc;
|
||||
|
||||
const customConfigFields: Record<string, unknown> = {};
|
||||
// add fields that are unknown to v2 to customConfigFields
|
||||
Object.keys(siteConfig).forEach((key) => {
|
||||
|
@ -309,7 +306,6 @@ export function createConfigFile({
|
|||
{
|
||||
docs: {
|
||||
...(v2DocsPath && {path: v2DocsPath}),
|
||||
homePageId,
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
editUrl: siteConfig.editUrl,
|
||||
|
@ -334,7 +330,7 @@ export function createConfigFile({
|
|||
const position = 'left';
|
||||
if (doc) {
|
||||
return {
|
||||
to: `docs/${doc === homePageId ? '' : doc}`,
|
||||
to: `docs/${doc}`,
|
||||
label,
|
||||
position,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue