Skip to content

Commit d7c16f6

Browse files
added custom-sidebar on docs page
1 parent a8c2a10 commit d7c16f6

File tree

18 files changed

+1807
-382
lines changed

18 files changed

+1807
-382
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ const config: Config = {
9999
value: `<div class="grid grid-cols-3 gap-4 w-xl">
100100
<a class="border-r col-span-1" href="/courses/" style="color:black ; ">Tutorials</a>
101101
<div class="grid grid-cols-4 col-span-2">
102-
<a href="/docs/category/sql/" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
103-
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
104-
<a href="/docs/category/GitHub/" class="nav__icons" > <img src="/icons/github.svg" title="GitHub" alt="GitHub" /> </a>
105-
<a href="/docs/category/nextjs/" class="nav__icons" > <img src="/icons/nextjs.svg" title="Nextjs" alt="Nextjs" /> </a>
102+
<a href="/docs/sql/intro-sql" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
103+
<a href="/docs/python/intro-python" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
104+
<a href="/docs/GitHub/intro-github" class="nav__icons" > <img src="/icons/github.svg" title="GitHub" alt="GitHub" /> </a>
105+
<a href="/docs/Nextjs/intro-github" class="nav__icons" > <img src="/icons/nextjs.svg" title="Nextjs" alt="Nextjs" /> </a>
106106
</div>
107107
</div>`,
108108
},

sidebars.ts

Lines changed: 122 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,133 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
1313
Create as many sidebars as you want.
1414
*/
1515
const sidebars: SidebarsConfig = {
16-
// By default, Docusaurus generates a sidebar from the docs folder structure
17-
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
18-
19-
// But you can create a sidebar manually
20-
/*
16+
// Custom manual sidebar configuration for complete control
2117
tutorialSidebar: [
22-
'intro',
23-
'hello',
2418
{
2519
type: 'category',
26-
label: 'Tutorial',
27-
items: ['tutorial-basics/create-a-document'],
20+
label: '🐙 GitHub',
21+
className: 'custom-sidebar-github',
22+
items: [
23+
'GitHub/intro-github',
24+
{
25+
type: 'category',
26+
label: '⚙️ Setup Environment',
27+
className: 'custom-sidebar-setup',
28+
items: [
29+
'GitHub/setup-environment/setup-environment',
30+
'GitHub/setup-environment/setup-git-on-windows',
31+
'GitHub/setup-environment/setup-git-on-mac',
32+
'GitHub/setup-environment/git-commands',
33+
],
34+
},
35+
{
36+
type: 'category',
37+
label: '📚 GitHub Basics',
38+
className: 'custom-sidebar-basics',
39+
items: [
40+
'GitHub/GitHub-basics/create-github-repo',
41+
'GitHub/GitHub-basics/github-repo-command-line',
42+
'GitHub/GitHub-basics/how-to-clone-repository',
43+
'GitHub/GitHub-basics/how-to-fork',
44+
'GitHub/GitHub-basics/firs-opensource-code',
45+
],
46+
},
47+
{
48+
type: 'category',
49+
label: '👨‍💼 Maintainer Guide',
50+
className: 'custom-sidebar-maintainer',
51+
items: [
52+
'GitHub/Maintainer-guide/github-labels',
53+
'GitHub/Maintainer-guide/milestone',
54+
'GitHub/Maintainer-guide/github-project',
55+
'GitHub/Maintainer-guide/enable-dicussion',
56+
],
57+
},
58+
],
59+
},
60+
{
61+
type: 'category',
62+
label: '🐍 Python',
63+
className: 'custom-sidebar-python',
64+
items: [
65+
'python/intro-python',
66+
'python/setup-environment',
67+
'python/python-syntax',
68+
'python/python-variables',
69+
'python/datatype-python',
70+
'python/python-casting',
71+
'python/python-string',
72+
'python/python-operators',
73+
'python/python-list',
74+
'python/python-tuple',
75+
'python/python-set',
76+
'python/python-dictionaries',
77+
'python/python-array',
78+
'python/python-conditional-statements',
79+
],
80+
},
81+
{
82+
type: 'category',
83+
label: '🗄️ SQL',
84+
className: 'custom-sidebar-sql',
85+
items: [
86+
'sql/intro-sql',
87+
'sql/setup-environment',
88+
{
89+
type: 'category',
90+
label: '📊 SQL Basics',
91+
className: 'custom-sidebar-sql-basics',
92+
items: [
93+
'sql/SQL-basics/selecting-data',
94+
'sql/SQL-basics/filtering-data',
95+
'sql/SQL-basics/ordering-data',
96+
'sql/SQL-basics/grouping-data',
97+
'sql/SQL-basics/the-inequality-operator',
98+
],
99+
},
100+
{
101+
type: 'category',
102+
label: '🔄 Table Transformation',
103+
className: 'custom-sidebar-sql-transform',
104+
items: [
105+
'sql/table-transformation/table-creation',
106+
'sql/table-transformation/alter-table',
107+
'sql/table-transformation/data-operations',
108+
'sql/table-transformation/list-drop-table',
109+
],
110+
},
111+
],
112+
},
113+
{
114+
type: 'category',
115+
label: '⚡ Next.js',
116+
className: 'custom-sidebar-nextjs',
117+
items: [
118+
'Nextjs/intro-github',
119+
'Nextjs/setup-environment',
120+
'Nextjs/git-commands',
121+
],
122+
},
123+
{
124+
type: 'category',
125+
label: '🎓 Google Student Ambassador',
126+
className: 'custom-sidebar-gsa',
127+
items: [
128+
'Google-Student-Ambassador/part-1-getting-started/gsa-part-1',
129+
'Google-Student-Ambassador/part-2-application-process/gsa-part-2',
130+
'Google-Student-Ambassador/part-3-eligibility/gsa-part-3',
131+
'Google-Student-Ambassador/part-4-gemini-pro/gsa-part-4',
132+
],
133+
},
134+
{
135+
type: 'category',
136+
label: '🔧 Technical',
137+
className: 'custom-sidebar-technical',
138+
items: [
139+
'Technical/intro-github',
140+
],
28141
},
29142
],
30-
*/
31143
};
32144

33145
export default sidebars;

src/components/CustomSidebar.module.css

Whitespace-only changes.

src/components/CustomSidebar.tsx

Whitespace-only changes.

0 commit comments

Comments
 (0)