Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"],
Expand Down
6 changes: 4 additions & 2 deletions src/components/js-live-code-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ export default function JSEditor({ children = "", title = "index.js" }: Props) {
Prism.tokenize(code, Prism.languages.javascript),
);
return tokens.map((line, i) => (
<div key={i} className="flex leading-6">
<div key={i} className="flex">
{/*
<span className="inline-block text-right mr-1 select-none text-gray-500 font-mono text-[14px] pt-1">
{i + 1}.
</span>
<span className="flex-1 mt-1">
*/}
<span className="flex-1">
{line.map((token, key) => (
<span
key={key}
Expand Down
14 changes: 14 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -40,6 +41,19 @@ export default function Home(): ReactNode {
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<Head>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5832817025080991"
crossOrigin="anonymous"
/>
<script
async
custom-element="amp-auto-ads"
src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"
/>
<meta name="google-adsense-account" content="ca-pub-5832817025080991" />
</Head>
{/* <HomepageHeader /> */}
<main>
<Hero />
Expand Down
1 change: 1 addition & 0 deletions static/ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google.com, pub-5832817025080991, DIRECT, f08c47fec0942fa0
Loading