mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
docs(v2): add more links to v1: announcementBar, versionDropdown, homepage (#4505)
* add more links to v1 doc + use Translate interpolation * add more links to v1 doc + use Translate interpolation * add version dropdown link to v1 domain
This commit is contained in:
parent
1f8e0bc48e
commit
819bb43433
2 changed files with 26 additions and 4 deletions
|
@ -277,11 +277,18 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
||||||
disableSwitch: false,
|
disableSwitch: false,
|
||||||
respectPrefersColorScheme: true,
|
respectPrefersColorScheme: true,
|
||||||
},
|
},
|
||||||
|
announcementBar: {
|
||||||
|
id: 'v1-new-domain',
|
||||||
|
content:
|
||||||
|
'➡️ Docusaurus v1 documentation has moved to <a target="_blank" rel="noopener noreferrer" href="https://v1.docusaurus.io/">v1.docusaurus.io</a>! 🔄',
|
||||||
|
},
|
||||||
|
/*
|
||||||
announcementBar: {
|
announcementBar: {
|
||||||
id: 'supportus',
|
id: 'supportus',
|
||||||
content:
|
content:
|
||||||
'⭐️ If you like Docusaurus, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/facebook/docusaurus">GitHub</a>! ⭐️',
|
'⭐️ If you like Docusaurus, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/facebook/docusaurus">GitHub</a>! ⭐️',
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
prism: {
|
prism: {
|
||||||
theme: require('prism-react-renderer/themes/github'),
|
theme: require('prism-react-renderer/themes/github'),
|
||||||
darkTheme: require('prism-react-renderer/themes/dracula'),
|
darkTheme: require('prism-react-renderer/themes/dracula'),
|
||||||
|
@ -331,6 +338,10 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
||||||
position: 'right',
|
position: 'right',
|
||||||
dropdownActiveClassDisabled: true,
|
dropdownActiveClassDisabled: true,
|
||||||
dropdownItemsAfter: [
|
dropdownItemsAfter: [
|
||||||
|
{
|
||||||
|
to: 'https://v1.docusaurus.io',
|
||||||
|
label: '1.x.x',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
to: '/versions',
|
to: '/versions',
|
||||||
label: 'All versions',
|
label: 'All versions',
|
||||||
|
|
|
@ -128,10 +128,21 @@ function Home() {
|
||||||
</div>
|
</div>
|
||||||
<div className={clsx(styles.announcement, styles.announcementDark)}>
|
<div className={clsx(styles.announcement, styles.announcementDark)}>
|
||||||
<div className={styles.announcementInner}>
|
<div className={styles.announcementInner}>
|
||||||
<Translate>Coming from v1? Check out our</Translate>{' '}
|
<Translate
|
||||||
<Link to="/docs/migration">
|
values={{
|
||||||
<Translate>v1 to v2 migration guide</Translate>
|
docusaurusV1Link: (
|
||||||
</Link>
|
<Link to="https://v1.docusaurus.io/">
|
||||||
|
<Translate>Docusaurus v1</Translate>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
migrationGuideLink: (
|
||||||
|
<Link to="/docs/migration">
|
||||||
|
<Translate>v1 to v2 migration guide</Translate>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
}}>
|
||||||
|
{`Coming from {docusaurusV1Link}? Check out our {migrationGuideLink}`}
|
||||||
|
</Translate>
|
||||||
.
|
.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue