File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Deploy Docs to Pages
33
44on :
55 push :
6- branches : ["main"]
6+ branches : ["main", "add-docs" ]
77 workflow_dispatch :
88
99permissions :
@@ -15,7 +15,6 @@ concurrency:
1515
1616jobs :
1717 build :
18- name : Build docs
1918 runs-on : ubuntu-latest
2019 steps :
2120 - uses : actions/checkout@v6
2928 path : ./site
3029
3130 deploy :
32- name : Deploy docs to GitHub Pages
3331 needs : build
3432 runs-on : ubuntu-latest
3533 permissions :
Original file line number Diff line number Diff line change 1+ <gradio-app src =" https://istupakov-onnx-asr.hf.space " info =" true " eager =" false " ></gradio-app >
Original file line number Diff line number Diff line change 1+ function getMkDocsTheme ( ) {
2+ const scheme = document . body . getAttribute ( "data-md-color-scheme" ) ;
3+ return scheme === "slate" ? "dark" : "light" ;
4+ }
5+
6+ function syncGradioTheme ( ) {
7+ const theme = getMkDocsTheme ( ) ;
8+ document
9+ . querySelectorAll ( "gradio-app" )
10+ . forEach ( app => app . className = theme ) ;
11+ }
12+
13+ document . addEventListener ( "DOMContentLoaded" , ( ) => {
14+ syncGradioTheme ( ) ;
15+
16+ const observer = new MutationObserver ( ( ) => {
17+ syncGradioTheme ( ) ;
18+ } ) ;
19+
20+ observer . observe ( document . body , {
21+ attributes : true ,
22+ attributeFilter : [ "data-md-color-scheme" ]
23+ } ) ;
24+ } ) ;
Original file line number Diff line number Diff line change @@ -48,9 +48,15 @@ watch:
4848 - README.md
4949
5050nav :
51- - Introduction : index.md
51+ - Readme : index.md
52+ - Demo : demo.md
5253 - Reference : reference.md
5354
55+ extra_javascript :
56+ - path : https://gradio.s3-us-west-2.amazonaws.com/6.3.0/gradio.js
57+ type : module
58+ - javascripts/gradio-theme-sync.js
59+
5460markdown_extensions :
5561 - admonition
5662 - attr_list
You can’t perform that action at this time.
0 commit comments