Adjust config files to use doc plugin

This commit is contained in:
Niklas Birk 2022-08-03 16:17:40 +02:00
parent 1b4f47eb1d
commit bf6dbf2e53
3 changed files with 50 additions and 38 deletions

View File

@ -32,20 +32,22 @@ const config = {
'classic', 'classic',
/** @type {import('@docusaurus/preset-classic').Options} */ /** @type {import('@docusaurus/preset-classic').Options} */
({ ({
docs: false, //{ // docs: false,
// sidebarPath: require.resolve('./sidebars.js'), docs: {
sidebarPath: require.resolve('./sidebars.js'),
// // 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/',
},
blog: false,
// blog: {
// showReadingTime: true,
// // Please change this to your repo. // // Please change this to your repo.
// // Remove this to remove the "edit this page" links. // // Remove this to remove the "edit this page" links.
// // editUrl: // // editUrl:
// // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', // // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
// }, // },
blog: {
showReadingTime: 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/',
},
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
}, },
@ -68,13 +70,17 @@ const config = {
src: 'img/niklas-birk-logo.svg', src: 'img/niklas-birk-logo.svg',
}, },
items: [ items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Mathematik, Informatik und Programmierung',
},
// { // {
// type: 'doc', // to: '/blog',
// docId: 'intro', // label: 'Blog',
// position: 'left', // position: 'left'
// label: 'Tutorial',
// }, // },
{to: '/blog', label: 'Blog', position: 'left'},
{ {
href: 'https://git.niklas-birk.de/niklas/niklas_birk_blog', href: 'https://git.niklas-birk.de/niklas/niklas_birk_blog',
label: 'Gitea', label: 'Gitea',
@ -85,17 +91,25 @@ const config = {
footer: { footer: {
style: 'dark', style: 'dark',
links: [ links: [
// {
// title: 'Docs',
// items: [
// {
// label: 'Tutorial',
// to: '/docs/intro',
// },
// ],
// },
{ {
title: 'Community', title: 'Themen',
items: [
{
label: 'Mathematik',
to: '/docs/mathematik',
},
{
label: 'Informatik',
to: '/docs/informatik',
},
{
label: 'Programmierung',
to: '/docs/programmierung',
},
],
},
{
title: 'Socials',
items: [ items: [
{ {
label: 'Twitter', label: 'Twitter',
@ -110,10 +124,10 @@ const config = {
{ {
title: 'More', title: 'More',
items: [ items: [
{ // {
label: 'Blog', // label: 'Blog',
to: '/blog', // to: '/blog',
}, // },
{ {
label: 'Website', label: 'Website',
href: 'https://www.niklas-birk.de', href: 'https://www.niklas-birk.de',

View File

@ -17,15 +17,13 @@ const sidebars = {
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually // But you can create a sidebar manually
/* // tutorialSidebar: [
tutorialSidebar: [ // {
{ // type: 'category',
type: 'category', // label: 'Tutorial',
label: 'Tutorial', // items: ['hello'],
items: ['hello'], // },
}, // ],
],
*/
}; };
module.exports = sidebars; module.exports = sidebars;

View File

@ -17,7 +17,7 @@ function HomepageHeader() {
<div className={styles.buttons}> <div className={styles.buttons}>
<Link <Link
className="button button--secondary button--lg" className="button button--secondary button--lg"
to="/blog"> to="/docs/intro">
Zu den Themen! Zu den Themen!
</Link> </Link>
</div> </div>