@@ -19,22 +19,22 @@ import {
1919
2020const baseUrl = '/' ;
2121const openziti = 'openziti' ;
22- const ozDocs = `/docs/${ openziti } ` ;
22+ const docsBase = `/docs/${ openziti } ` ;
2323
2424const REMARK_MAPPINGS = [
2525 { from : '@onpremdocs' , to : '/onprem' } ,
26- { from : '@openzitidocs' , to : `${ ozDocs } ` } ,
26+ { from : '@openzitidocs' , to : `${ docsBase } ` } ,
2727 { from : '@static' , to : `` } ,
2828] ;
2929
3030const redirectsArr : { to : string ; from : string [ ] } [ ] = [
3131 {
3232 to : docUrl ( openziti , '/category/deployments' ) ,
33- from : [ docUrl ( ozDocs , '/reference/deployments' ) ]
33+ from : [ docUrl ( docsBase , '/reference/deployments' ) ]
3434 } ,
3535 {
3636 to : docUrl ( openziti , '/guides/external-auth/browzer/' ) ,
37- from : [ docUrl ( ozDocs , '/identity-providers-for-browZer' ) ]
37+ from : [ docUrl ( docsBase , '/identity-providers-for-browZer' ) ]
3838 }
3939] ;
4040
@@ -48,7 +48,7 @@ const config: Config = {
4848 title : 'OpenZiti' ,
4949 tagline : 'Replacing Infrastructure With Software' ,
5050 url : `http://localhost:${ port } ` ,
51- baseUrl : `${ baseUrl } ` ,
51+ baseUrl : `/ ` ,
5252 trailingSlash : undefined ,
5353 onBrokenLinks : 'throw' ,
5454 onBrokenMarkdownLinks : 'throw' ,
@@ -78,9 +78,9 @@ const config: Config = {
7878 '@docusaurus/theme-search-algolia' ,
7979 ] ,
8080 customFields : {
81- DOCUSAURUS_BASE_PATH : '/' ,
82- DOCUSAURUS_DOCS_PATH : ozDocs ,
83- OPENZITI_DOCS_BASE : ozDocs ,
81+ DOCUSAURUS_BASE_PATH : '/docs ' ,
82+ DOCUSAURUS_DOCS_PATH : docsBase ,
83+ OPENZITI_DOCS_BASE : docsBase ,
8484 } ,
8585 plugins : [
8686 function webpackAliases ( ) {
@@ -102,13 +102,13 @@ const config: Config = {
102102 '@docusaurus/plugin-content-blog' ,
103103 {
104104 showReadingTime : true ,
105- routeBasePath : `${ ozDocs } /blog` ,
105+ routeBasePath : `${ docsBase } /blog` ,
106106 tagsBasePath : 'tags' ,
107107 include : [ '**/*.{md,mdx}' ] ,
108108 path : 'blog' ,
109109 remarkPlugins : [
110110 remarkYouTube ,
111- [ remarkReplaceMetaUrl , { from : '@staticoz' , to : `${ ozDocs } ` } ] ,
111+ [ remarkReplaceMetaUrl , { from : '@staticoz' , to : `${ docsBase } ` } ] ,
112112 [ remarkReplaceMetaUrl , { from : '@site' , to : `${ baseUrl } ` } ] ,
113113 [ remarkScopedPath , { mappings : REMARK_MAPPINGS } ] ,
114114 ] ,
@@ -120,41 +120,41 @@ const config: Config = {
120120 '@docusaurus/plugin-client-redirects' ,
121121 {
122122 createRedirects : path => {
123- if ( path . startsWith ( docUrl ( ozDocs , "/guides/topologies/gateway/" ) ) ) {
124- return [ path . replace ( docUrl ( ozDocs , "/guides/topologies/gateway/" ) , docUrl ( ozDocs , "/guides/local-gateway/" ) ) ] ;
123+ if ( path . startsWith ( docUrl ( docsBase , "/guides/topologies/gateway/" ) ) ) {
124+ return [ path . replace ( docUrl ( docsBase , "/guides/topologies/gateway/" ) , docUrl ( docsBase , "/guides/local-gateway/" ) ) ] ;
125125 }
126- if ( path . startsWith ( docUrl ( ozDocs , "/guides/deployments/kubernetes/" ) ) ) {
127- return [ path . replace ( docUrl ( ozDocs , "/guides/deployments/kubernetes/" ) , docUrl ( ozDocs , "/guides/kubernetes/hosting/" ) ) ] ;
126+ if ( path . startsWith ( docUrl ( docsBase , "/guides/deployments/kubernetes/" ) ) ) {
127+ return [ path . replace ( docUrl ( docsBase , "/guides/deployments/kubernetes/" ) , docUrl ( docsBase , "/guides/kubernetes/hosting/" ) ) ] ;
128128 }
129- if ( path . startsWith ( docUrl ( ozDocs , "/reference/tunnelers/kubernetes/" ) ) ) {
130- return [ path . replace ( docUrl ( ozDocs , "/reference/tunnelers/kubernetes/" ) , docUrl ( ozDocs , "/guides/kubernetes/workload-tunneling/" ) ) ] ;
129+ if ( path . startsWith ( docUrl ( docsBase , "/reference/tunnelers/kubernetes/" ) ) ) {
130+ return [ path . replace ( docUrl ( docsBase , "/reference/tunnelers/kubernetes/" ) , docUrl ( docsBase , "/guides/kubernetes/workload-tunneling/" ) ) ] ;
131131 }
132- if ( path . startsWith ( docUrl ( ozDocs , "/guides/deployments/" ) ) ) {
132+ if ( path . startsWith ( docUrl ( docsBase , "/guides/deployments/" ) ) ) {
133133 return [
134- path . replace ( docUrl ( ozDocs , "/guides/deployments/" ) , docUrl ( ozDocs , "/reference/deployments/" ) ) ,
134+ path . replace ( docUrl ( docsBase , "/guides/deployments/" ) , docUrl ( docsBase , "/reference/deployments/" ) ) ,
135135 ] ;
136136 }
137- if ( path . startsWith ( docUrl ( ozDocs , "/reference/developer/api/" ) ) ) { // for each existing page
137+ if ( path . startsWith ( docUrl ( docsBase , "/reference/developer/api/" ) ) ) { // for each existing page
138138 return [
139- path . replace ( docUrl ( ozDocs , "/reference/developer/api/" ) , "/api/" ) , // return a "from" redirect for each old path
140- path . replace ( docUrl ( ozDocs , "/reference/developer/api/" ) , "/api/rest/" ) ,
141- path . replace ( docUrl ( ozDocs , "/reference/developer/api/" ) , "/api/rest/edge-apis/" )
139+ path . replace ( docUrl ( docsBase , "/reference/developer/api/" ) , "/api/" ) , // return a "from" redirect for each old path
140+ path . replace ( docUrl ( docsBase , "/reference/developer/api/" ) , "/api/rest/" ) ,
141+ path . replace ( docUrl ( docsBase , "/reference/developer/api/" ) , "/api/rest/edge-apis/" )
142142 ] ;
143143 }
144- if ( path . startsWith ( docUrl ( ozDocs , "/learn/quickstarts/" ) ) ) {
145- return [ path . replace ( docUrl ( ozDocs , "/learn/quickstarts/" ) , docUrl ( ozDocs , "/quickstarts/" ) ) ] ;
144+ if ( path . startsWith ( docUrl ( docsBase , "/learn/quickstarts/" ) ) ) {
145+ return [ path . replace ( docUrl ( docsBase , "/learn/quickstarts/" ) , docUrl ( docsBase , "/quickstarts/" ) ) ] ;
146146 }
147- if ( path . startsWith ( docUrl ( ozDocs , "/learn/core-concepts/zero-trust-models/" ) ) ) {
147+ if ( path . startsWith ( docUrl ( docsBase , "/learn/core-concepts/zero-trust-models/" ) ) ) {
148148 return [
149- path . replace ( docUrl ( ozDocs , "/learn/core-concepts/zero-trust-models/" ) , docUrl ( ozDocs , "/deployment-architecture/" ) ) ,
150- path . replace ( docUrl ( ozDocs , "/learn/core-concepts/zero-trust-models/" ) , docUrl ( ozDocs , "/core-concepts/zero-trust-models/" ) )
149+ path . replace ( docUrl ( docsBase , "/learn/core-concepts/zero-trust-models/" ) , docUrl ( docsBase , "/deployment-architecture/" ) ) ,
150+ path . replace ( docUrl ( docsBase , "/learn/core-concepts/zero-trust-models/" ) , docUrl ( docsBase , "/core-concepts/zero-trust-models/" ) )
151151 ] ;
152152 }
153- if ( path . startsWith ( docUrl ( ozDocs , "/learn/core-concepts/" ) ) ) {
154- return [ path . replace ( docUrl ( ozDocs , "/learn/core-concepts/" ) , docUrl ( ozDocs , "/core-concepts/" ) ) ] ;
153+ if ( path . startsWith ( docUrl ( docsBase , "/learn/core-concepts/" ) ) ) {
154+ return [ path . replace ( docUrl ( docsBase , "/learn/core-concepts/" ) , docUrl ( docsBase , "/core-concepts/" ) ) ] ;
155155 }
156- if ( path . startsWith ( docUrl ( ozDocs , "/learn/introduction/" ) ) ) {
157- return [ path . replace ( docUrl ( ozDocs , "/learn/introduction/" ) , docUrl ( ozDocs , "/introduction/" ) ) ] ;
156+ if ( path . startsWith ( docUrl ( docsBase , "/learn/introduction/" ) ) ) {
157+ return [ path . replace ( docUrl ( docsBase , "/learn/introduction/" ) , docUrl ( docsBase , "/introduction/" ) ) ] ;
158158 }
159159 return undefined ;
160160 } ,
@@ -169,11 +169,11 @@ const config: Config = {
169169 {
170170 id : 'openziti' ,
171171 path : `docs` ,
172- routeBasePath : `${ ozDocs } ` ,
172+ routeBasePath : `${ docsBase } ` ,
173173 sidebarPath : `sidebars.ts` ,
174174 includeCurrentVersion : true ,
175175 remarkPlugins : [
176- [ remarkReplaceMetaUrl , { from : '@staticoz' , to : `${ ozDocs } ` } ] ,
176+ [ remarkReplaceMetaUrl , { from : '@staticoz' , to : `${ docsBase } ` } ] ,
177177 [ remarkScopedPath , { mappings : REMARK_MAPPINGS } ] ,
178178 [ remarkCodeSections , { logLevel : LogLevel . Debug } ] ,
179179 ] ,
@@ -255,16 +255,16 @@ const config: Config = {
255255 position : 'right'
256256 } ,
257257 {
258- to : docUrl ( ozDocs , '/learn/introduction/' ) ,
258+ to : docUrl ( docsBase , '/learn/introduction/' ) ,
259259 label : 'Documentation' ,
260260 position : 'right' ,
261- activeBaseRegex : docUrl ( ozDocs , '/(?!downloads)' ) ,
261+ activeBaseRegex : docUrl ( docsBase , '/(?!downloads)' ) ,
262262 } ,
263263 {
264- to : docUrl ( ozDocs , '/downloads' ) ,
264+ to : docUrl ( docsBase , '/downloads' ) ,
265265 label : 'Downloads' ,
266266 position : 'right' ,
267- activeBaseRegex : docUrl ( ozDocs , '/downloads' ) ,
267+ activeBaseRegex : docUrl ( docsBase , '/downloads' ) ,
268268 } ,
269269 {
270270 type : 'html' ,
@@ -282,31 +282,31 @@ const config: Config = {
282282 } ,
283283 {
284284 type : 'html' ,
285- value : `<a href="https://www.youtube.com/OpenZiti" target="_blank" title="OpenZiti on YouTube"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/yt.svg" ) + `" alt="YouTube logo"/>YouTube</span></a>`
285+ value : `<a href="https://www.youtube.com/OpenZiti" target="_blank" title="OpenZiti on YouTube"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/yt.svg" ) + `" alt="YouTube logo"/>YouTube</span></a>`
286286 } ,
287287 {
288288 type : 'html' ,
289- value : `<a href="https://x.com/OpenZiti" target="_blank" title="OpenZiti on X(formerly Twitter)"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/twit.svg" ) + `" alt="X/Twitter logo"/>X (Twitter)</span></a>`
289+ value : `<a href="https://x.com/OpenZiti" target="_blank" title="OpenZiti on X(formerly Twitter)"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/twit.svg" ) + `" alt="X/Twitter logo"/>X (Twitter)</span></a>`
290290 } ,
291291 {
292292 type : 'html' ,
293- value : `<a href="https://www.reddit.com/r/openziti" target="_blank" title="OpenZiti Subreddit"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/reddit-logo.png" ) + `" alt="Reddit logo"/>Reddit</span></a>`
293+ value : `<a href="https://www.reddit.com/r/openziti" target="_blank" title="OpenZiti Subreddit"><span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/reddit-logo.png" ) + `" alt="Reddit logo"/>Reddit</span></a>`
294294 } ,
295295 {
296296 type : 'html' ,
297- value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/ziggy.png" ) + `" alt="X/Twitter Ziggy logo"/><a href="https://x.com/OpenZiggy" target="_blank" title="OpenZiggy on X(formerly Twitter)">Ziggy</span></a>`
297+ value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/ziggy.png" ) + `" alt="X/Twitter Ziggy logo"/><a href="https://x.com/OpenZiggy" target="_blank" title="OpenZiggy on X(formerly Twitter)">Ziggy</span></a>`
298298 } ,
299299 {
300300 type : 'html' ,
301301 value : '<div class="text-divider"><p>Other</p></div>'
302302 } ,
303303 {
304304 type : 'html' ,
305- value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/blog-icon.png" ) + `" alt="OpenZiti blog logo"/><a href="https://blog.openziti.io/" target="_blank" title="Blog">Blog</span></a>`
305+ value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/blog-icon.png" ) + `" alt="OpenZiti blog logo"/><a href="https://blog.openziti.io/" target="_blank" title="Blog">Blog</span></a>`
306306 } ,
307307 {
308308 type : 'html' ,
309- value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( ozDocs , "img/oz-test-kitchen.png" ) + `" alt="OpenZiti Test Kitchen logo"/><a href="https://github.com/openziti-test-kitchen" target="_blank" title="Git project for the test kitchen">Test Kitchen</span></a>`
309+ value : `<span id="navbarDropdownItem"><img id="navbarDropdownImage" src="` + docUrl ( docsBase , "img/oz-test-kitchen.png" ) + `" alt="OpenZiti Test Kitchen logo"/><a href="https://github.com/openziti-test-kitchen" target="_blank" title="Git project for the test kitchen">Test Kitchen</span></a>`
310310 } ,
311311 ]
312312 } ,
0 commit comments