File tree Expand file tree Collapse file tree
modules/docusaurus-website Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 "scripts" : {},
4444 "dependencies" : {
4545 "@cmfcmf/docusaurus-search-local" : " ^1.0.0" ,
46- "@docusaurus/plugin-client-redirects" : " ^2 .0.0" ,
47- "@docusaurus/plugin-content-docs" : " ^2 .0.0" ,
48- "@docusaurus/preset-classic" : " ^2 .0.0" ,
49- "@mdx-js/react" : " ^1.6.22 " ,
46+ "@docusaurus/plugin-client-redirects" : " ^3 .0.0" ,
47+ "@docusaurus/plugin-content-docs" : " ^3 .0.0" ,
48+ "@docusaurus/preset-classic" : " ^3 .0.0" ,
49+ "@mdx-js/react" : " ^3.0.0 " ,
5050 "babel-plugin-styled-components" : " ^2.0.0" ,
51+ "cheerio" : " 1.0.0-rc.9" ,
5152 "deepmerge" : " ^4.2.2" ,
5253 "glob" : " ^7.1.4" ,
5354 "styled-components" : " ^5.3.3"
5455 },
5556 "devDependencies" : {
56- "@docusaurus/core" : " ^2 .0.0" ,
57+ "@docusaurus/core" : " ^3 .0.0" ,
5758 "react" : " ^18.2.0" ,
5859 "react-dom" : " ^18.2.0"
5960 },
6061 "peerDependencies" : {
61- "@docusaurus/core" : " ^2 .0.0" ,
62+ "@docusaurus/core" : " ^3 .0.0" ,
6263 "react" : " *" ,
6364 "react-dom" : " *"
6465 },
Original file line number Diff line number Diff line change 11import React from 'react' ;
22// Note: this is internal API and may change in a future release
33// https://github.com/facebook/docusaurus/discussions/7457
4- import { useDocsSidebar } from '@docusaurus/theme-common/internal ' ;
4+ import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client ' ;
55import useBaseUrl from '@docusaurus/useBaseUrl' ;
66import styled from 'styled-components' ;
77import { isMobile } from './common.js' ;
Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ export type OcularWebsiteConfig = {
9090
9191 /** Search settings */
9292 search ?: false | 'local' | ThemeConfig [ 'algolia' ] ;
93+
94+ /** Additional CSS files to include */
95+ customCss ?: string [ ] ;
9396} ;
9497
9598export function getDocusaurusConfig ( config : OcularWebsiteConfig ) : Config {
@@ -104,7 +107,8 @@ export function getDocusaurusConfig(config: OcularWebsiteConfig): Config {
104107 docsTableOfContents,
105108 examplesDir,
106109 exampleTableOfContents,
107- webpackConfig = { }
110+ webpackConfig = { } ,
111+ customCss = [ ]
108112 } = config ;
109113 const hasExamples = Boolean ( examplesDir && exampleTableOfContents ) ;
110114
@@ -131,7 +135,7 @@ export function getDocusaurusConfig(config: OcularWebsiteConfig): Config {
131135 editUrl : `${ repoUrl } /tree/master/docs`
132136 } ,
133137 theme : {
134- customCss : [ resolve ( cwd , '../src/styles.css' ) ]
138+ customCss : [ resolve ( cwd , '../src/styles.css' ) , ... customCss ]
135139 }
136140 } as ClassicThemeOptions
137141 ]
You can’t perform that action at this time.
0 commit comments