@@ -3,15 +3,15 @@ import type { Config } from "@docusaurus/types";
33import type * as Preset from "@docusaurus/preset-classic" ;
44import remarkMath from "remark-math" ;
55import rehypeKatex from "rehype-katex" ;
6+ import * as dotenv from "dotenv" ;
7+ dotenv . config ( ) ;
68
79// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
810
9-
1011const config : Config = {
1112 title : "Recode Hive" ,
1213 tagline : "Dinosaurs are cool" ,
1314 favicon : "img/favicon.ico" ,
14-
1515
1616 url : "https://recodehive.com" ,
1717 baseUrl : "/" ,
@@ -25,18 +25,18 @@ const config: Config = {
2525 // Google Analytics and Theme Scripts
2626 scripts : [
2727 {
28- src : ' /instant-theme.js' ,
28+ src : " /instant-theme.js" ,
2929 async : false ,
3030 } ,
3131 {
32- src : ' https://www.googletagmanager.com/gtag/js?id=G-W02Z2VJYCR' ,
32+ src : " https://www.googletagmanager.com/gtag/js?id=G-W02Z2VJYCR" ,
3333 async : true ,
3434 } ,
3535 {
36- src : ' /gtag-init.js' ,
36+ src : " /gtag-init.js" ,
3737 } ,
3838 {
39- src : ' /pinterest-init.js' ,
39+ src : " /pinterest-init.js" ,
4040 } ,
4141 ] ,
4242
@@ -47,23 +47,22 @@ const config: Config = {
4747
4848 presets : [
4949 [
50- ' classic' ,
50+ " classic" ,
5151 {
5252 docs : {
53- path : "docs" ,
53+ path : "docs" ,
5454 routeBasePath : "docs" ,
5555 sidebarPath : require . resolve ( "./sidebars.ts" ) ,
5656 editUrl : ( { docPath } ) =>
57- `https://github.com/recodehive/recode-website/tree/main/docs/${ docPath } ` ,
57+ `https://github.com/recodehive/recode-website/tree/main/docs/${ docPath } ` ,
5858 } ,
5959 blog : {
6060 showReadingTime : true ,
6161 feedOptions : {
6262 type : [ "rss" , "atom" ] ,
6363 xslt : true ,
6464 } ,
65- editUrl :
66- "https://github.com/recodehive/recode-website/tree/main" ,
65+ editUrl : "https://github.com/recodehive/recode-website/tree/main" ,
6766 onInlineTags : "warn" ,
6867 onInlineAuthors : "warn" ,
6968 onUntruncatedBlogPosts : "warn" ,
@@ -72,7 +71,7 @@ const config: Config = {
7271 customCss : require . resolve ( "./src/css/custom.css" ) ,
7372 } ,
7473 gtag : {
75- trackingID : ' G-W02Z2VJYCR' ,
74+ trackingID : " G-W02Z2VJYCR" ,
7675 anonymizeIP : false ,
7776 } ,
7877 } satisfies Preset . Options ,
@@ -82,14 +81,13 @@ const config: Config = {
8281 themeConfig : {
8382 image : "img/docusaurus-social-card.jpg" ,
8483 colorMode : {
85- defaultMode : ' light' ,
84+ defaultMode : " light" ,
8685 disableSwitch : false ,
8786 respectPrefersColorScheme : false , // Let users manually control theme
8887 } ,
8988 navbar : {
90- title :"Recode Hive" ,
89+ title : "Recode Hive" ,
9190 logo : {
92-
9391 alt : "RecodeHive Logo" ,
9492 src : "img/logo.png" ,
9593 } ,
@@ -102,14 +100,14 @@ const config: Config = {
102100 {
103101 type : "html" ,
104102 value : `<div class="grid grid-cols-3 gap-4 w-xl">
105- <a class="border-r col-span-1" href="/docs/">Tutorials</a>
106- <div class="grid grid-cols-4 col-span-2">
107- <a href="/docs/sql/intro-sql" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
108- <a href="/docs/python/intro-python" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
109- <a href="/docs/GitHub/intro-github" class="nav__icons" > <img src="/icons/github.svg" title="GitHub" alt="GitHub" /> </a>
110- <a href="/docs/Nextjs/intro-nextjs" class="nav__icons" > <img src="/icons/nextjs.svg" title="Nextjs" alt="Nextjs" /> </a>
111- </div>
112- </div>` ,
103+ <a class="border-r col-span-1" href="/docs/">Tutorials</a>
104+ <div class="grid grid-cols-4 col-span-2">
105+ <a href="/docs/sql/intro-sql" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
106+ <a href="/docs/python/intro-python" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
107+ <a href="/docs/GitHub/intro-github" class="nav__icons" > <img src="/icons/github.svg" title="GitHub" alt="GitHub" /> </a>
108+ <a href="/docs/Nextjs/intro-nextjs" class="nav__icons" > <img src="/icons/nextjs.svg" title="Nextjs" alt="Nextjs" /> </a>
109+ </div>
110+ </div>` ,
113111 } ,
114112 {
115113 type : "html" ,
@@ -118,13 +116,13 @@ const config: Config = {
118116 {
119117 type : "html" ,
120118 value : `<div class="grid grid-cols-3 gap-4">
121- <a class="border-r col-span-1" href="/courses/">Courses</a>
122- <div class="grid grid-cols-4 col-span-2">
123- <a href="https://www.youtube.com/watch?v=GrTV59Y84S8&list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/git.svg" alt="git" /> </a>
124- <a href="https://www.youtube.com/watch?v=O1ahDsq8DU0&list=PLrLTYhoDFx-k62rLLajSB-jeqKwLkDrkF&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/postman.svg" alt="Postman" /> </a>
125- <a href="/docs/google-campus-ambassador-part-1" class="nav__icons"> <img src="https://avatars.githubusercontent.com/u/222021622?s=400&u=cb88492d19d9023cac470c3959b25285bb5abcfa&v=4" alt="Google" /> </a>
126- </div>
127- </div>` ,
119+ <a class="border-r col-span-1" href="/courses/">Courses</a>
120+ <div class="grid grid-cols-4 col-span-2">
121+ <a href="https://www.youtube.com/watch?v=GrTV59Y84S8&list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/git.svg" alt="git" /> </a>
122+ <a href="https://www.youtube.com/watch?v=O1ahDsq8DU0&list=PLrLTYhoDFx-k62rLLajSB-jeqKwLkDrkF&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/postman.svg" alt="Postman" /> </a>
123+ <a href="/docs/google-campus-ambassador-part-1" class="nav__icons"> <img src="https://avatars.githubusercontent.com/u/222021622?s=400&u=cb88492d19d9023cac470c3959b25285bb5abcfa&v=4" alt="Google" /> </a>
124+ </div>
125+ </div>` ,
128126 } ,
129127 {
130128 type : "html" ,
@@ -133,12 +131,12 @@ const config: Config = {
133131 {
134132 type : "html" ,
135133 value : `<div class="grid grid-cols-3 gap-4">
136- <a class="border-r col-span-1" href="/interview-prep/" target="_self">Interview Prep</a>
137- <div class="grid grid-cols-1 col-span-2">
138- <a href="/interview-prep/" target="_self" class="nav__icons"> 🧩Technical </a>
139- <a href="/interview-prep/" target="_self" class="nav__icons"> 💡Behavioral </a>
140- </div>
141- </div>` ,
134+ <a class="border-r col-span-1" href="/interview-prep/" target="_self">Interview Prep</a>
135+ <div class="grid grid-cols-1 col-span-2">
136+ <a href="/interview-prep/" target="_self" class="nav__icons"> 🧩Technical </a>
137+ <a href="/interview-prep/" target="_self" class="nav__icons"> 💡Behavioral </a>
138+ </div>
139+ </div>` ,
142140 } ,
143141 ] ,
144142 } ,
@@ -169,7 +167,7 @@ const config: Config = {
169167 {
170168 label : "🎖️ GitHub Badges" ,
171169 to : "/badges/github-badges/" ,
172- } ,
170+ } ,
173171 ] ,
174172 } ,
175173 {
@@ -213,47 +211,10 @@ const config: Config = {
213211 position : "right" ,
214212 value : '<div id="firebase-auth-github-navbar"></div>' ,
215213 } ,
216- // {
217- // type: "dropdown",
218- // html: '<span class="nav-emoji">🏷️</span> Tags',
219- // position: "left",
220- // items: [
221- // {
222- // label: "🏷️ Tutorial Tags 📚",
223- // to: "/docs/tags/",
224- // activeBaseRegex: "/docs/tags/",
225- // },
226- // {
227- // label: "🏷️ Courses Tags 🎓",
228- // to: "/courses/tags/",
229- // activeBaseRegex: "/courses/tags/",
230- // },
231- // {
232- // label: "🏷️ DSA Tags 🧠",
233- // to: "/dsa/tags/",
234- // activeBaseRegex: "/dsa/tags/",
235- // },
236- // ],
237- // },
238-
239- // {
240- // href: "https://github.com/codeharborhub/codeharborhub",
241- // position: "right",
242- // className: "header-github-link",
243- // "aria-label": "GitHub repository",
244- // },
245- // {
246- // href: "https://www.codeharborhub.live/register",
247- // position: "right",
248- // className: "header-signup-link",
249- // "aria-label": "Auth",
250- // label: "Auth",
251- // },
252214 ] ,
253- // hideOnScroll: true,
254215 } ,
255216 footer : {
256- style : ' dark' ,
217+ style : " dark" ,
257218 links : [ ] ,
258219 copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } recodehive. Built with Docusaurus.` ,
259220 } ,
@@ -294,22 +255,12 @@ const config: Config = {
294255 disableInDev : false ,
295256 } ,
296257 ] ,
297- // Commented out to use TSX-based community page instead
298- // [
299- // "@docusaurus/plugin-content-docs",
300- // {
301- // id: "community",
302- // path: "community",
303- // routeBasePath: "community",
304- // sidebarPath: require.resolve("./sidebarsCommunity.js"),
305- // remarkPlugins: [remarkMath],
306- // rehypePlugins: [rehypeKatex],
307- // showLastUpdateAuthor: true,
308- // showLastUpdateTime: true,
309- // },
310- // ],
311258 ] ,
312- // scripts: [],
259+
260+ // ✅ Add this customFields object to expose the token to the client-side
261+ customFields : {
262+ gitToken : process . env . DOCUSAURUS_GIT_TOKEN ,
263+ } ,
313264} ;
314265
315- export default config ;
266+ export default config ;
0 commit comments