mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 20:57:17 +02:00
chore(v2): mention about docs home page in init templates (#2763)
* chore(v2): mention about docs home page in init templates * use home page id for docs Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
This commit is contained in:
parent
fc161b8455
commit
c7baa125e6
7 changed files with 19 additions and 13 deletions
|
@ -15,7 +15,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
to: 'docs/doc1',
|
to: 'docs/',
|
||||||
activeBasePath: 'docs',
|
activeBasePath: 'docs',
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
|
@ -53,7 +53,7 @@ module.exports = {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Blog',
|
label: 'Blog',
|
||||||
to: 'blog',
|
to: 'blog/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'GitHub',
|
label: 'GitHub',
|
||||||
|
@ -70,6 +70,8 @@ module.exports = {
|
||||||
'@docusaurus/preset-bootstrap',
|
'@docusaurus/preset-bootstrap',
|
||||||
{
|
{
|
||||||
docs: {
|
docs: {
|
||||||
|
// It is recommended to set document id as docs home page (`docs/` path).
|
||||||
|
homePageId: 'doc1',
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
editUrl:
|
editUrl:
|
||||||
'https://github.com/facebook/docusaurus/edit/master/website/',
|
'https://github.com/facebook/docusaurus/edit/master/website/',
|
||||||
|
|
|
@ -66,7 +66,7 @@ function Home() {
|
||||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
<Link to={useBaseUrl('docs/doc1')}>Get Started</Link>
|
<Link to={useBaseUrl('docs/')}>Get Started</Link>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|
|
@ -15,7 +15,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
to: 'docs/doc1',
|
to: 'docs/',
|
||||||
activeBasePath: 'docs',
|
activeBasePath: 'docs',
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
|
@ -36,11 +36,11 @@ module.exports = {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Style Guide',
|
label: 'Style Guide',
|
||||||
to: 'docs/doc1',
|
to: 'docs/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Second Doc',
|
label: 'Second Doc',
|
||||||
to: 'docs/doc2',
|
to: 'docs/doc2/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -83,6 +83,8 @@ module.exports = {
|
||||||
'@docusaurus/preset-classic',
|
'@docusaurus/preset-classic',
|
||||||
{
|
{
|
||||||
docs: {
|
docs: {
|
||||||
|
// It is recommended to set document id as docs home page (`docs/` path).
|
||||||
|
homePageId: 'doc1',
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
// Please change this to your repo.
|
// Please change this to your repo.
|
||||||
editUrl:
|
editUrl:
|
||||||
|
|
|
@ -71,7 +71,7 @@ function Home() {
|
||||||
'button button--outline button--secondary button--lg',
|
'button button--outline button--secondary button--lg',
|
||||||
styles.getStarted,
|
styles.getStarted,
|
||||||
)}
|
)}
|
||||||
to={useBaseUrl('docs/doc1')}>
|
to={useBaseUrl('docs/')}>
|
||||||
Get Started
|
Get Started
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
to: 'docs/doc1',
|
to: 'docs/',
|
||||||
activeBasePath: 'docs',
|
activeBasePath: 'docs',
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
|
@ -46,7 +46,7 @@ module.exports = {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Style Guide',
|
label: 'Style Guide',
|
||||||
to: 'docs/doc1',
|
to: 'docs/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Second Doc',
|
label: 'Second Doc',
|
||||||
|
@ -117,6 +117,8 @@ module.exports = {
|
||||||
'@docusaurus/preset-classic',
|
'@docusaurus/preset-classic',
|
||||||
{
|
{
|
||||||
docs: {
|
docs: {
|
||||||
|
// It is recommended to set document id as docs home page (`docs/` path).
|
||||||
|
homePageId: 'doc1',
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
// Please change this to your repo.
|
// Please change this to your repo.
|
||||||
editUrl:
|
editUrl:
|
||||||
|
|
|
@ -80,7 +80,7 @@ function Home() {
|
||||||
'button button--outline button--secondary button--lg',
|
'button button--outline button--secondary button--lg',
|
||||||
styles.getStarted,
|
styles.getStarted,
|
||||||
)}
|
)}
|
||||||
to={useBaseUrl('docs/doc1')}>
|
to={useBaseUrl('docs/')}>
|
||||||
Get Started
|
Get Started
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -99,15 +99,15 @@ module.exports = {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: versions[0],
|
label: versions[0],
|
||||||
to: 'docs/introduction',
|
to: 'docs/',
|
||||||
},
|
},
|
||||||
...versions.slice(1).map((version) => ({
|
...versions.slice(1).map((version) => ({
|
||||||
label: version,
|
label: version,
|
||||||
to: `docs/${version}/introduction`,
|
to: `docs/${version}/`,
|
||||||
})),
|
})),
|
||||||
{
|
{
|
||||||
label: 'Master/Unreleased',
|
label: 'Master/Unreleased',
|
||||||
to: 'docs/next/introduction',
|
to: 'docs/next/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue