mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-06 19:15:12 +02:00
⚡️ perf: improved indentation and formatting for readability
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import {themes as prismThemes} from 'prism-react-renderer';
|
import { themes as prismThemes } from 'prism-react-renderer';
|
||||||
import type {Config} from '@docusaurus/types';
|
import type { Config } from '@docusaurus/types';
|
||||||
import type * as Preset from '@docusaurus/preset-classic';
|
import type * as Preset from '@docusaurus/preset-classic';
|
||||||
|
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
@@ -7,21 +7,20 @@ const config: Config = {
|
|||||||
tagline: 'The official Documentation of Snigdha OS',
|
tagline: 'The official Documentation of Snigdha OS',
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
// Set the production url of your site here
|
// Deployment and site configuration
|
||||||
url: 'https://snigdhaos.org/',
|
url: 'https://snigdhaos.org/', // Production URL
|
||||||
baseUrl: '/documentation/',
|
baseUrl: '/documentation/', // Base URL for the site
|
||||||
trailingSlash: false,
|
trailingSlash: false,
|
||||||
|
organizationName: 'Snigdha-OS', // GitHub organization/user name
|
||||||
organizationName: 'Snigdha-OS', // GitHub org/user name
|
projectName: 'documentation', // Repository name
|
||||||
projectName: 'documentation', // Repo name
|
deploymentBranch: 'gh-pages', // Branch for deployment
|
||||||
deploymentBranch: 'gh-pages',
|
onBrokenLinks: 'throw', // Throw error for broken links
|
||||||
onBrokenLinks: 'throw',
|
onBrokenMarkdownLinks: 'warn', // Warn for broken Markdown links
|
||||||
onBrokenMarkdownLinks: 'warn',
|
|
||||||
|
|
||||||
// Localization settings
|
// Localization settings
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultLocale: 'en',
|
defaultLocale: 'en', // Default language
|
||||||
locales: ['en', 'hi', 'bn'], // English, Hindi, Bengali
|
locales: ['en', 'hi', 'bn'], // Supported languages: English, Hindi, Bengali
|
||||||
localeConfigs: {
|
localeConfigs: {
|
||||||
en: { label: 'English' },
|
en: { label: 'English' },
|
||||||
hi: { label: 'हिन्दी' },
|
hi: { label: 'हिन्दी' },
|
||||||
@@ -34,16 +33,16 @@ const config: Config = {
|
|||||||
'classic',
|
'classic',
|
||||||
{
|
{
|
||||||
docs: {
|
docs: {
|
||||||
sidebarPath: './sidebars.ts',
|
sidebarPath: './sidebars.ts', // Path to sidebar configuration
|
||||||
sidebarCollapsible: false,
|
sidebarCollapsible: false, // Sidebar items are not collapsible
|
||||||
routeBasePath: '/', // Set docs as the homepage
|
routeBasePath: '/', // Set docs as the homepage
|
||||||
showLastUpdateTime: true,
|
showLastUpdateTime: true, // Show last updated time for docs
|
||||||
editUrl: 'https://github.com/Snigdha-OS/documentation/tree/master/',
|
editUrl: 'https://github.com/Snigdha-OS/documentation/tree/master/', // URL for editing docs
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
customCss: './src/css/custom.css',
|
customCss: './src/css/custom.css', // Custom CSS for styling
|
||||||
},
|
},
|
||||||
sitemap: false, // Disable the default sitemap plugin from the preset
|
sitemap: false, // Disable default sitemap plugin
|
||||||
} satisfies Preset.Options,
|
} satisfies Preset.Options,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -52,14 +51,14 @@ const config: Config = {
|
|||||||
[
|
[
|
||||||
'@docusaurus/plugin-sitemap',
|
'@docusaurus/plugin-sitemap',
|
||||||
{
|
{
|
||||||
changefreq: 'weekly',
|
changefreq: 'weekly', // Frequency of updates in sitemap
|
||||||
priority: 0.5,
|
priority: 0.5, // Default priority for pages
|
||||||
filename: 'sitemap.xml',
|
filename: 'sitemap.xml', // Sitemap filename
|
||||||
ignorePatterns: ['/tags/**'],
|
ignorePatterns: ['/tags/**'], // Ignore tags pages
|
||||||
createSitemapItems: async (params) => {
|
createSitemapItems: async (params) => {
|
||||||
const {defaultCreateSitemapItems, ...rest} = params;
|
const { defaultCreateSitemapItems, ...rest } = params;
|
||||||
const items = await defaultCreateSitemapItems(rest);
|
const items = await defaultCreateSitemapItems(rest);
|
||||||
return items.filter((item) => !item.url.includes('/page/'));
|
return items.filter((item) => !item.url.includes('/page/')); // Exclude pagination pages
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -75,7 +74,7 @@ const config: Config = {
|
|||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'localeDropdown', // Language switcher
|
type: 'localeDropdown', // Language switcher dropdown
|
||||||
position: 'right',
|
position: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -87,12 +86,12 @@ const config: Config = {
|
|||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
style: 'dark',
|
style: 'dark',
|
||||||
links: [],
|
links: [], // Customize footer links here
|
||||||
copyright: `Copyright © ${new Date().getFullYear()} Snigdha OS. Powered by TONMOY INFRASTRUCTURE™.`,
|
copyright: `Copyright © ${new Date().getFullYear()} Snigdha OS. Powered by TONMOY INFRASTRUCTURE™.`,
|
||||||
},
|
},
|
||||||
prism: {
|
prism: {
|
||||||
theme: prismThemes.github,
|
theme: prismThemes.github, // Light theme
|
||||||
darkTheme: prismThemes.dracula,
|
darkTheme: prismThemes.dracula, // Dark theme
|
||||||
},
|
},
|
||||||
metaTags: [
|
metaTags: [
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user