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:
Alexey Pyltsyn 2020-05-18 08:14:06 +03:00 committed by GitHub
parent fc161b8455
commit c7baa125e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 13 deletions

View file

@ -15,7 +15,7 @@ module.exports = {
},
links: [
{
to: 'docs/doc1',
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
@ -53,7 +53,7 @@ module.exports = {
items: [
{
label: 'Blog',
to: 'blog',
to: 'blog/',
},
{
label: 'GitHub',
@ -70,6 +70,8 @@ module.exports = {
'@docusaurus/preset-bootstrap',
{
docs: {
// It is recommended to set document id as docs home page (`docs/` path).
homePageId: 'doc1',
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/facebook/docusaurus/edit/master/website/',

View file

@ -66,7 +66,7 @@ function Home() {
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link to={useBaseUrl('docs/doc1')}>Get Started</Link>
<Link to={useBaseUrl('docs/')}>Get Started</Link>
</div>
</header>
<main>