From ab7cb0c5e73be641c4f3077861515e6b3a72d305 Mon Sep 17 00:00:00 2001 From: Ajay Dhangar Date: Tue, 24 Mar 2026 21:15:58 +0530 Subject: [PATCH 1/2] fix codeEditor bug --- src/components/js-live-code-editor/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/js-live-code-editor/index.tsx b/src/components/js-live-code-editor/index.tsx index e6ae466..5d37151 100644 --- a/src/components/js-live-code-editor/index.tsx +++ b/src/components/js-live-code-editor/index.tsx @@ -123,11 +123,13 @@ export default function JSEditor({ children = "", title = "index.js" }: Props) { Prism.tokenize(code, Prism.languages.javascript), ); return tokens.map((line, i) => ( -
+
+ {/* {i + 1}. - + */} + {line.map((token, key) => ( Date: Tue, 24 Mar 2026 21:23:02 +0530 Subject: [PATCH 2/2] added Ads code --- docusaurus.config.ts | 28 +++++++++++++++++++++++++--- src/pages/index.tsx | 14 ++++++++++++++ static/ads.txt | 1 + 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 static/ads.txt diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 2ce5a8a..6ae7b0e 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -68,6 +68,16 @@ const config: Config = { ], ], + stylesheets: [ + { + href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css", + type: "text/css", + integrity: + "sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM", + crossorigin: "anonymous", + }, + ], + themeConfig: { // Replace with your project's social card image: "img/docusaurus-social-card.jpg", @@ -141,9 +151,21 @@ const config: Config = { copyright: `Copyright © ${new Date().getFullYear()} JavaScript Mastery. All rights reserved.`, }, prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, - }, + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + additionalLanguages: [ + "java", + "latex", + "haskell", + "matlab", + "PHp", + "powershell", + "bash", + "diff", + "json", + "scss", + ], + }, } satisfies Preset.ThemeConfig, plugins: ["./src/plugins/tailwind-config.js"], diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 65186dd..8fc917d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,6 +1,7 @@ import type {ReactNode} from 'react'; // import clsx from 'clsx'; // import Link from '@docusaurus/Link'; +import Head from "@docusaurus/Head"; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; import {Community } from '@site/src/components/Community'; @@ -40,6 +41,19 @@ export default function Home(): ReactNode { + +