Skip to content

Commit 383698b

Browse files
authored
Merge pull request #2 from javascript-mastery/dev-1
Dev 1
2 parents 9d7812f + 83a092c commit 383698b

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

docusaurus.config.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ const config: Config = {
6868
],
6969
],
7070

71+
stylesheets: [
72+
{
73+
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
74+
type: "text/css",
75+
integrity:
76+
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
77+
crossorigin: "anonymous",
78+
},
79+
],
80+
7181
themeConfig: {
7282
// Replace with your project's social card
7383
image: "img/docusaurus-social-card.jpg",
@@ -141,9 +151,21 @@ const config: Config = {
141151
copyright: `Copyright © ${new Date().getFullYear()} JavaScript Mastery. All rights reserved.`,
142152
},
143153
prism: {
144-
theme: prismThemes.github,
145-
darkTheme: prismThemes.dracula,
146-
},
154+
theme: prismThemes.github,
155+
darkTheme: prismThemes.dracula,
156+
additionalLanguages: [
157+
"java",
158+
"latex",
159+
"haskell",
160+
"matlab",
161+
"PHp",
162+
"powershell",
163+
"bash",
164+
"diff",
165+
"json",
166+
"scss",
167+
],
168+
},
147169
} satisfies Preset.ThemeConfig,
148170

149171
plugins: ["./src/plugins/tailwind-config.js"],

src/components/js-live-code-editor/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ export default function JSEditor({ children = "", title = "index.js" }: Props) {
123123
Prism.tokenize(code, Prism.languages.javascript),
124124
);
125125
return tokens.map((line, i) => (
126-
<div key={i} className="flex leading-6">
126+
<div key={i} className="flex">
127+
{/*
127128
<span className="inline-block text-right mr-1 select-none text-gray-500 font-mono text-[14px] pt-1">
128129
{i + 1}.
129130
</span>
130-
<span className="flex-1 mt-1">
131+
*/}
132+
<span className="flex-1">
131133
{line.map((token, key) => (
132134
<span
133135
key={key}

src/pages/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {ReactNode} from 'react';
22
// import clsx from 'clsx';
33
// import Link from '@docusaurus/Link';
4+
import Head from "@docusaurus/Head";
45
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
56
import Layout from '@theme/Layout';
67
import {Community } from '@site/src/components/Community';
@@ -40,6 +41,19 @@ export default function Home(): ReactNode {
4041
<Layout
4142
title={`Hello from ${siteConfig.title}`}
4243
description="Description will go into a meta tag in <head />">
44+
<Head>
45+
<script
46+
async
47+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5832817025080991"
48+
crossOrigin="anonymous"
49+
/>
50+
<script
51+
async
52+
custom-element="amp-auto-ads"
53+
src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"
54+
/>
55+
<meta name="google-adsense-account" content="ca-pub-5832817025080991" />
56+
</Head>
4357
{/* <HomepageHeader /> */}
4458
<main>
4559
<Hero />

static/ads.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google.com, pub-5832817025080991, DIRECT, f08c47fec0942fa0

0 commit comments

Comments
 (0)