File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010 # Allow running this workflow manually from the Actions tab
1111 workflow_dispatch :
12-
12+
1313defaults :
1414 run :
1515 shell : bash
@@ -23,10 +23,17 @@ jobs:
2323 name : Test deployment
2424 runs-on : ubuntu-latest
2525 steps :
26- - uses : actions/checkout@v4
26+ - name : Checkout Docusaurus site
27+ uses : actions/checkout@v4
2728 with :
2829 fetch-depth : 0
2930
31+ - name : Checkout TSC faqs
32+ uses : actions/checkout@v4
33+ with :
34+ repository : fairpm/tsc
35+ path : external/tsc/faq
36+
3037 - uses : actions/setup-node@v4
3138 with :
3239 node-version : 20
Original file line number Diff line number Diff line change 55// See: https://docusaurus.io/docs/api/docusaurus-config
66
77import { themes as prismThemes } from 'prism-react-renderer' ;
8+ import navbarItems from './navbarItems.js' ;
9+ import plugins from './plugins.js' ;
810
911// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
1012
@@ -80,34 +82,7 @@ const config = {
8082 // alt: 'FAIR Logo',
8183 // src: 'img/logo.svg',
8284 // },
83- items : [
84- {
85- type : 'docSidebar' ,
86- sidebarId : 'tutorialSidebar' ,
87- position : 'left' ,
88- label : 'Docs' ,
89- } ,
90- {
91- to : '/blog' ,
92- label : 'Blog' ,
93- position : 'left'
94- } ,
95- {
96- to : 'docs/contributing' ,
97- label : 'Get involved' ,
98- position : 'left'
99- } ,
100- {
101- href : 'https://github.com/fairpm/docs' ,
102- label : 'GitHub' ,
103- position : 'right' ,
104- } ,
105- {
106- href : 'https://fair.pm/' ,
107- label : 'fair.pm' ,
108- position : 'right' ,
109- } ,
110- ] ,
85+ items : navbarItems ,
11186 } ,
11287 footer : {
11388 style : 'dark' ,
@@ -167,6 +142,8 @@ const config = {
167142 darkTheme : prismThemes . dracula ,
168143 } ,
169144 } ) ,
145+
146+ plugins : plugins ,
170147} ;
171148
172149export default config ;
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+
4+ const navbarItems = [
5+ {
6+ type : 'docSidebar' ,
7+ sidebarId : 'tutorialSidebar' ,
8+ position : 'left' ,
9+ label : 'Docs' ,
10+ } ,
11+ {
12+ to : '/blog' ,
13+ label : 'Blog' ,
14+ position : 'left'
15+ } ,
16+ {
17+ to : 'docs/contributing' ,
18+ label : 'Get involved' ,
19+ position : 'left'
20+ } ,
21+ {
22+ href : 'https://github.com/fairpm/docs' ,
23+ label : 'GitHub' ,
24+ position : 'right' ,
25+ } ,
26+ {
27+ href : 'https://fair.pm/' ,
28+ label : 'fair.pm' ,
29+ position : 'right' ,
30+ } ,
31+ ] ;
32+
33+ navbarItems . push ( {
34+ type : 'docSidebar' ,
35+ sidebarId : 'tscSidebar' ,
36+ docsPluginId : 'tsc' ,
37+ position : 'left' ,
38+ label : 'TSC' ,
39+ } ) ;
40+
41+
42+ export default navbarItems ;
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+
4+ const plugins = [
5+ [
6+ '@docusaurus/plugin-content-docs' ,
7+ {
8+ id : 'tsc' ,
9+ path : 'external/tsc/faq' ,
10+ routeBasePath : 'tsc' ,
11+ sidebarPath : require . resolve ( './sidebars-tsc.js' ) ,
12+ editUrl : ( { docPath} ) =>
13+ `https://github.com/fairpm/tsc/blob/main/faqs/${ docPath } ` ,
14+ } ,
15+ ] ,
16+ ] ;
17+
18+
19+ export default plugins ;
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+ // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
4+
5+ /**
6+ * Creating a sidebar enables you to:
7+ - create an ordered group of docs
8+ - render a sidebar for each doc of that group
9+ - provide next/previous navigation
10+
11+ The sidebars can be generated from the filesystem, or explicitly defined here.
12+
13+ Create as many sidebars as you want.
14+
15+ @type {import('@docusaurus/plugin-content-docs').SidebarsConfig }
16+ */
17+ const sidebarsTsc = {
18+ // By default, Docusaurus generates a sidebar from the docs folder structure
19+ tscSidebar : [ { type : 'autogenerated' , dirName : '.' } ] ,
20+
21+ // But you can create a sidebar manually
22+
23+ // tscSidebar: [
24+ // 'intro',
25+ // 'hello',
26+ // {
27+ // type: 'category',
28+ // label: 'Tutorial',
29+ // items: ['tutorial-basics/create-a-document'],
30+ // },
31+ // ],
32+ } ;
33+
34+ export default sidebarsTsc ;
You can’t perform that action at this time.
0 commit comments