File tree 4 files changed +23
-14
lines changed
4 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
branches :
6
6
- main
7
+ workflow_dispatch :
7
8
# Review gh actions docs if you want to further define triggers, paths, etc
8
9
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9
10
19
20
- name : Install pnpm
20
21
run : npm install -g pnpm@8
21
22
- name : Install dependencies
22
- run : pnpm install --no-frozen-lockfile
23
+ run : pnpm i --no-frozen-lockfile --unsafe-perm --ignore-scripts
23
24
- name : Test build website
24
25
run : pnpm build
Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ const config = {
210
210
} ,
211
211
} ) ,
212
212
plugins : [
213
+ customPostCssPlugin ,
213
214
"docusaurus-plugin-sass" ,
214
215
async function TailwindCSSPlugin ( context , options ) {
215
216
return {
@@ -225,4 +226,16 @@ const config = {
225
226
] ,
226
227
} ;
227
228
229
+ /** @return {import('@docusaurus/types').Plugin } */
230
+ function customPostCssPlugin ( ) {
231
+ return {
232
+ name : "custom-postcss" ,
233
+ configurePostCss ( options ) {
234
+ // Append new PostCSS plugins here.
235
+ options . plugins . push ( require ( "postcss-preset-env" ) ) ; // allow newest CSS syntax
236
+ return options ;
237
+ }
238
+ } ;
239
+ }
240
+
228
241
module . exports = config ;
Original file line number Diff line number Diff line change 23
23
"documate:upload" : " documate upload"
24
24
},
25
25
"dependencies" : {
26
+ "postcss-preset-env" : " ^10.0.3" ,
26
27
"@crowdin/cli" : " 3" ,
27
28
"@crowdin/crowdin-api-client" : " ^1.23.4" ,
28
29
"@docusaurus/core" : " 3.4.0" ,
Original file line number Diff line number Diff line change 1
1
import Link from "@docusaurus/Link" ;
2
- import { useColorMode } from "@docusaurus/theme-common" ;
2
+ // import useBaseUrl from '@docusaurus/useBaseUrl';
3
+ import ThemedImage from '@theme/ThemedImage' ;
3
4
import Translate from "@docusaurus/Translate" ;
4
5
import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
5
6
import Layout from "@theme/Layout" ;
@@ -100,8 +101,6 @@ function HomepageHeader() {
100
101
101
102
102
103
const HomeBaseContent = ( ) => {
103
- const { colorMode } = useColorMode ( ) ;
104
-
105
104
const mainContent = React . useMemo ( ( ) => {
106
105
return (
107
106
< main className = "mb-20 my-10 max-w-7xl mx-auto w-full px-4 sm:px-6 lg:px-8max-w-6xl" >
@@ -112,21 +111,16 @@ const HomeBaseContent = () => {
112
111
) ;
113
112
} , [ ] ) ;
114
113
115
- if ( colorMode === "dark" ) {
116
- return (
117
- < >
118
- < StarrySky />
119
- { mainContent }
120
- </ >
121
- ) ;
122
- } else {
123
114
return (
124
115
< >
125
- < AuroraBackground />
116
+ < ThemedImage sources = { {
117
+ light : < StarrySky /> ,
118
+ dark : < AuroraBackground /> ,
119
+ } }
120
+ />
126
121
{ mainContent }
127
122
</ >
128
123
) ;
129
- }
130
124
} ;
131
125
132
126
You can’t perform that action at this time.
0 commit comments