File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import { themes } from 'prism-react-renderer';
6
6
import rehypeKatex from 'rehype-katex' ;
7
7
import remarkMath from 'remark-math' ;
8
8
9
+ import { howToBasePath } from './src/theme/BlogPostItem/utils' ;
10
+
9
11
export const defaultLocale = 'en' ;
10
12
11
13
// A workaround for locale-specific values in the config
@@ -16,7 +18,6 @@ export const __dirname = path.dirname(fileURLToPath(import.meta.url));
16
18
17
19
export const mainSiteUrl = 'https://docs.logto.io/' ;
18
20
export const tutorialsSiteUrl = 'https://tutorials.logto.io/' ;
19
- export const howToBasePath = 'how-to' ;
20
21
export const cfPagesBranch = String ( process . env . CF_PAGES_BRANCH ) ;
21
22
export const isCfPagesPreview = Boolean ( cfPagesBranch && cfPagesBranch !== 'master' ) ;
22
23
export const siteUrls = Object . freeze ( {
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ import {
14
14
currentLocale ,
15
15
defaultLocale ,
16
16
getCloudflareSubdomain ,
17
- howToBasePath ,
18
17
injectHeadTagsPlugin ,
19
18
isCfPagesPreview ,
20
19
localeConfigs ,
21
20
mainSiteUrl ,
22
21
} from './docusaurus-common.config' ;
22
+ import { howToBasePath } from './src/theme/BlogPostItem/utils' ;
23
23
24
24
const getLogtoDocsUrl = ( ) =>
25
25
isCfPagesPreview
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import useCategorizedTutorialMetadata from '@site/src/hooks/use-categorized-tuto
16
16
import { useCurrentLocalePrefix } from '@site/src/hooks/useCurrentLocalePrefix' ;
17
17
import { onKeyDownHandler } from '@site/src/utils/a11y' ;
18
18
19
+ import { howToBasePath } from '../../utils' ;
19
20
import Dropdown from '../SelectionDropdown' ;
20
21
21
22
import styles from './index.module.scss' ;
@@ -143,7 +144,7 @@ const TitleWithSelectionDropdown = (props: Props) => {
143
144
slugLastPart
144
145
: slugFirstPart + selectedSlugPart + slug . slice ( slug . indexOf ( slugMiddlePart ) ) ;
145
146
146
- push ( `${ locale } /tutorials /${ targetSlug } ` ) ;
147
+ push ( `${ locale } /${ howToBasePath } /${ targetSlug } ` ) ;
147
148
}
148
149
} ;
149
150
Original file line number Diff line number Diff line change 1
1
export const isHowToTutorial = ( slug ?: string ) : boolean => / ^ b u i l d - .+ - w i t h - .+ $ / . test ( slug || '' ) ;
2
+ export const howToBasePath = 'how-to' ;
You can’t perform that action at this time.
0 commit comments