Skip to content

Commit

Permalink
updated the config
Browse files Browse the repository at this point in the history
  • Loading branch information
YonasW committed Sep 30, 2024
1 parent f7a1df4 commit c12534f
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 63 deletions.
143 changes: 89 additions & 54 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,100 @@
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { themes as prismThemes } from 'prism-react-renderer';
import { themes as prismThemes } from 'prism-react-renderer';

const themeConfig: Preset.ThemeConfig = {
navbar: {
title: '0GDocumentation',
logo: {
alt: '0G Logo',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/0G-Labs/0g-docs',
label: 'GitHub',
position: 'right',
},
],
},
prism: {
theme: require('prism-react-renderer').themes.vsDark,
darkTheme: require('prism-react-renderer').themes.vsDark,
additionalLanguages: ['bash', 'json', 'yaml'],
const config: Config = {
title: '0G Documentation',
tagline: 'The Next Generation Web3 Infrastructure',
favicon: 'img/favicon.ico',

url: 'https://docs.0g.ai',
baseUrl: '/',
organizationName: '0G Labs',
projectName: '0g-docs',

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

i18n: {
defaultLocale: 'en',
locales: ['en'],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{ label: 'Introduction', to: 'docs/intro.md' },
{ label: 'Run a Node', to: 'docs/run-a-node/node-overview.md' },
],
},

presets: [
[
'classic',
{
title: 'Community',
items: [
{ label: 'Discord', href: 'https://discord.gg/0glabs' },
{ label: 'Telegram', href: 'https://t.me/zgcommunity' },
{ label: 'Twitter', href: 'https://twitter.com/0g_labs' },
],
docs: {
sidebarPath: './sidebars.ts',
routeBasePath: '/', // Set docs as the root
},
blog: false, // Disable the blog plugin
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],

themeConfig: {
navbar: {
title: '0G Documentation',
logo: {
alt: '0G Logo',
src: 'img/logo.svg',
},
{
title: 'More',
items: [
{ label: 'Blog', to: 'https://0g.ai/blog' },
{ label: 'GitHub', href: 'https://github.com/0glabs' },
],
items: [
{
href: 'https://github.com/0G-Labs/0g-docs',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{ label: 'Introduction', to: '/intro' }, // Updated path
{ label: 'Run a Node', to: '/run-a-node/node-overview' }, // Updated path
],
},
{
title: 'Community',
items: [
{ label: 'Discord', href: 'https://discord.gg/0glabs' },
{ label: 'Telegram', href: 'https://t.me/zgcommunity' },
{ label: 'Twitter', href: 'https://twitter.com/0g_labs' },
],
},
{
title: 'More',
items: [
{ label: 'Blog', href: 'https://0g.ai/blog' }, // Changed to href
{ label: 'GitHub', href: 'https://github.com/0glabs' },
],
},
],
logo: {
alt: '0G Labs Logo',
src: 'img/logo.svg',
href: 'https://0g.ai',
},
],
logo: {
alt: '0G Labs Logo',
src: 'img/logo.svg',
href: 'https://0g.ai',
copyright: `Copyright © ${new Date().getFullYear()} 0G Labs, Built with Docusaurus.`,
},
copyright: `Copyright © ${new Date().getFullYear()} 0G Labs, Built with Docusaurus.`,
},
};
prism: {
theme: prismThemes.vsDark,
darkTheme: prismThemes.vsDark,
additionalLanguages: ['bash', 'json', 'yaml'],
},
} satisfies Preset.ThemeConfig,

const customFields = {
authUsername: process.env.AUTH_USERNAME,
authPassword: process.env.AUTH_PASSWORD,
customFields: {
authUsername: process.env.AUTH_USERNAME,
authPassword: process.env.AUTH_PASSWORD,
},
};

export default themeConfig;
export default config;
11 changes: 2 additions & 9 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,8 @@ const sidebars: SidebarsConfig = {
'build-with-0g/storage-sdk',
'build-with-0g/da-integration',
'build-with-0g/rollups',
],
},
{
type: 'category',
label: 'Developer Tooling',
className: 'sidebar-category dev-tools',
items: [
'developer-tooling/faucet',
'developer-tooling/explorer',
'build-with-0g/faucet',
'build-with-0g/explorer',
],
},
{
Expand Down

0 comments on commit c12534f

Please sign in to comment.