Skip to content

Commit

Permalink
Overhaul styling of Documentation (#6719)
Browse files Browse the repository at this point in the history
* fix: overhaul styling for documentation

* fix: re-add pink underlines to markdown links

* fix: Spelling error in one of the comments

* fix: add fonts to static folder

* fix: add back scrollbar, make sure width matches the navbar on homepage and docs.

* fix: update h1 and h2 sizings to all non-docs pages to match sizing / layout from before

---------

Co-authored-by: Daniel Meyer <[email protected]>
  • Loading branch information
tsekiguchi and pubkey authored Jan 5, 2025
1 parent 4869198 commit d52f445
Show file tree
Hide file tree
Showing 7 changed files with 500 additions and 393 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
.search-icon {
background-image: var(--ifm-navbar-search-input-icon);
height: auto;
width: 24px;
width: 1.25rem;
cursor: pointer;
padding: 8px;
line-height: 32px;
line-height: 1.5rem;
background-repeat: no-repeat;
background-position: center;
display: none;
Expand Down
308 changes: 155 additions & 153 deletions docs-src/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,170 +9,172 @@ import type { Config } from '@docusaurus/types';

/** @type {import('@docusaurus/types').Config} */
const config: Config = {
title: 'RxDB - JavaScript Database',
tagline: 'Realtime JavaScript Database',
favicon: 'img/favicon.ico',
title: 'RxDB - JavaScript Database',
tagline: 'Realtime JavaScript Database',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://rxdb.info',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// Set the production url of your site here
url: 'https://rxdb.info',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'pubkey', // Usually your GitHub org/user name.
projectName: 'rxdb', // Usually your repo name.
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'pubkey', // Usually your GitHub org/user name.
projectName: 'rxdb', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [['./docusaurus-lunr-search-main/src/', {
excludeRoutes: ['blog', 'releases']
}]],

scripts: [
// {
// id: 'CookieDeclaration',
// src: 'https://consent.cookiebot.com/c429ebbd-6e92-4150-b700-ca186e06bc7c/cd.js',
// type: 'text/javascript'
// }
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
[
'./docusaurus-lunr-search-main/src/',
{
excludeRoutes: ['blog', 'releases'],
},
],
],

// already included via google tag manager
// {
// id: 'Cookiebot',
// src: 'https://consent.cookiebot.com/uc.js?cbid=c429ebbd-6e92-4150-b700-ca186e06bc7c',
// 'data-cbid': 'c429ebbd-6e92-4150-b700-ca186e06bc7c',
// 'data-blockingmode': 'auto',
// type: 'text/javascript',
// async: true
// },
/*
* Pipedrive embedded chat.
* Disabled because people should fill out the premium form
* and ask questions there so that we have more meta info.
*/
// {
// src: 'https://leadbooster-chat.pipedrive.com/assets/loader.js',
// type: 'text/javascript',
// async: true
// }
// {
// src: 'https://www.googletagmanager.com/gtag/js?id=G-62D63SY3S0',
// async: true,
// },
],
scripts: [
// {
// id: 'CookieDeclaration',
// src: 'https://consent.cookiebot.com/c429ebbd-6e92-4150-b700-ca186e06bc7c/cd.js',
// type: 'text/javascript'
// }

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
gtag: {
trackingID: 'G-62D63SY3S0',
anonymizeIP: false,
},
googleTagManager: {
containerId: 'GTM-PL63TR5',
},
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '',
path: './docs',
// I disabled the editUrl because it just confuses users and does not look professional
// editUrl: 'https://github.com/pubkey/rxdb/tree/master/docs-src/',
},
// blog: {
// showReadingTime: true,
// editUrl:
// 'https://github.com/pubkey/rxdb/tree/master/docs/',
// already included via google tag manager
// {
// id: 'Cookiebot',
// src: 'https://consent.cookiebot.com/uc.js?cbid=c429ebbd-6e92-4150-b700-ca186e06bc7c',
// 'data-cbid': 'c429ebbd-6e92-4150-b700-ca186e06bc7c',
// 'data-blockingmode': 'auto',
// type: 'text/javascript',
// async: true
// },
theme: {
customCss: './src/css/custom.css',
{
src: '/js/analytics.js',
type: 'text/javascript',
async: true,
},
}),
]
],
/*
* Pipedrive embedded chat.
* Disabled because people should fill out the premium form
* and ask questions there so that we have more meta info.
*/
// {
// src: 'https://leadbooster-chat.pipedrive.com/assets/loader.js',
// type: 'text/javascript',
// async: true
// }
// {
// src: 'https://www.googletagmanager.com/gtag/js?id=G-62D63SY3S0',
// async: true,
// },
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
gtag: {
trackingID: 'G-62D63SY3S0',
anonymizeIP: false,
},
googleTagManager: {
containerId: 'GTM-PL63TR5',
},
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '',
path: './docs',
// I disabled the editUrl because it just confuses users and does not look professional
// editUrl: 'https://github.com/pubkey/rxdb/tree/master/docs-src/',
},
// blog: {
// showReadingTime: true,
// editUrl:
// 'https://github.com/pubkey/rxdb/tree/master/docs/',
// },
theme: {
customCss: './src/css/custom.css',
},
},
],
],

// Replace with your project's social card
image: 'img/rxdb_social_card.png',
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
title: 'RxDB',
logo: {
alt: 'RxDB Logo',
src: 'files/logo/logo.svg',
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
// Replace with your project's social card
image: 'img/rxdb_social_card.png',
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
title: 'RxDB',
logo: {
alt: 'RxDB Logo',
src: 'files/logo/logo.svg',
},
items: [
{
href: '/quickstart.html',
label: 'Docs',
position: 'right',
},
{
to: '/chat',
target: '_blank',
label: 'Community',
position: 'right',
className: 'navbar-icon-discord'
},
{
href: '/premium',
label: 'Premium',
position: 'right',
},
{
href: '/consulting',
label: 'Support',
position: 'right',
},
// {
// href: '/code',
// target: '_blank',
// label: 'Code',
// position: 'right',
// },
// {
// to: '/chat',
// target: '_blank',
// label: ' ',
// position: 'right',
// className: 'navbar-icon-discord'
// },
],
},
footer: {
style: 'dark',
links: [],
copyright: ' ',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
},
items: [
// {
// type: 'docSidebar',
// sidebarId: 'tutorialSidebar',
// position: 'left',
// label: 'Tutorial',
// },
// { to: '/blog', label: 'Blog', position: 'left' },
{
href: '/quickstart.html',
label: 'Docs',
position: 'right',
},
{
to: '/chat',
target: '_blank',
label: 'Community',
position: 'right',
className: 'navbar-icon-discord'
},
{
href: '/premium',
label: 'Premium',
position: 'right',
},
{
href: '/consulting',
label: 'Support',
position: 'right',
},
// {
// href: '/code',
// target: '_blank',
// label: 'Code',
// position: 'right',
// },
// {
// to: '/chat',
// target: '_blank',
// label: ' ',
// position: 'right',
// className: 'navbar-icon-discord'
// },
],
},
footer: {
style: 'dark',
links: [],
copyright: ' ',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

export default config;
Loading

0 comments on commit d52f445

Please sign in to comment.