Disable Blog
Change Configuration in docusaurus.config.ts
In the docusaurus.config.ts
file:
- Set
blog: false
to disable the blog.
From:
docusaurus.config.ts
const config: Config = {
...
presets: [
'classic',
{
...
blog:
{
showReadingTime: true,
feedOptions: {
type: ['rss', 'atom'],
xslt: true,
},
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl:
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
// Useful options to enforce blogging best practices
onInlineTags: 'warn',
onInlineAuthors: 'warn',
onUntruncatedBlogPosts: 'warn',
},
}
]
}
To:
docusaurus.config.ts
const config: Config = {
...
presets: [
'classic',
{
...
blog: false,
}
]
}
Remove blog
from Navbar
To remove the blog link from the navbar, simply delete the line that defines the blog link.
docusaurus.config.ts
const config: Config = {
...
themeConfig:{
navbar:{
items: [
{to: '/blog', label: 'Blog', position: 'left'},
]
}
}
}
Remove blog
from Footer
To remove the blog link from the footer, delete the section that adds it under the "More" menu.
Remove line 11 to 14 (highlighted) to remove blog from navbar
docusaurus.config.ts
const config: Config = {
...
themeConfig:{
footer:{
...
links: [
...
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
...
],
},
]
}
}
}