Skip to content

Commit

Permalink
docs: fix homepage theme
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Mar 26, 2024
1 parent 2ca70db commit 139850a
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 434 deletions.
4 changes: 2 additions & 2 deletions packages/document/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@types/react-dom": "^18",
"react": "18.2.0",
"react-dom": "18.2.0",
"rsbuild-plugin-google-analytics": "^1.0.0",
"rspress-plugin-font-open-sans": "^1.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.2.2"
},
"dependencies": {
"framer-motion": "^10.17.6",
"react-markdown": "^9.0.1",
"rsfamily-nav-icon": "^1.0.2",
"rspress": "^1.15.1",
"rspress": "^1.16.1",
"tailwindcss": "^3.4.0"
}
}
27 changes: 4 additions & 23 deletions packages/document/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'path';
import path from 'node:path';
import { defineConfig } from 'rspress/config';
import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans';
import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics';

export default defineConfig({
plugins: [pluginFontOpenSans()],
Expand All @@ -21,7 +22,6 @@ export default defineConfig({
],
markdown: {
checkDeadLinks: true,
experimentalMdxRs: true,
},
route: {
cleanUrls: true,
Expand All @@ -31,7 +31,7 @@ export default defineConfig({
globalStyles: path.join(__dirname, 'theme', 'index.css'),
themeConfig: {
footer: {
message: 'Copyright © 2023 Bytedance',
message: 'Copyright © 2024 ByteDance',
},
socialLinks: [
{
Expand Down Expand Up @@ -66,6 +66,7 @@ export default defineConfig({
],
},
builderConfig: {
plugins: [pluginGoogleAnalytics({ id: 'G-9DETE89N4Q' })],
source: {
alias: {
'@components': path.join(__dirname, 'src/components'),
Expand All @@ -78,25 +79,5 @@ export default defineConfig({
addPlugins([require('tailwindcss')]);
},
},
html: {
tags: [
// Configure Google Analytics
{
tag: 'script',
attrs: {
async: true,
src: 'https://www.googletagmanager.com/gtag/js?id=G-9DETE89N4Q',
},
},
{
tag: 'script',
children: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9DETE89N4Q');`,
},
],
},
},
});
1 change: 0 additions & 1 deletion packages/document/theme/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export function HomeLayout() {
<div
className="relative dark:border-dark-50"
style={{
background: 'var(--rp-home-bg)',
minHeight: 'calc(40rem - var(--rp-nav-height))',
paddingBottom: '24px',
}}
Expand Down
Loading

0 comments on commit 139850a

Please sign in to comment.