Skip to content

Commit cd4f96c

Browse files
committed
refactor: use contentRoot naming
1 parent acd14fd commit cd4f96c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/utils/md.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export const getContentBySlug = (slug: string) => {
7070
}
7171
}
7272

73-
const currentDir = getContentRoot()
74-
let fullPath = toPosixPath(join(currentDir, realSlug))
73+
const contentRoot = getContentRoot()
74+
let fullPath = toPosixPath(join(contentRoot, realSlug))
7575
let contentNotTranslated = false
7676

7777
// If content is not translated, use english content fallback
@@ -107,9 +107,9 @@ export const getContent = (dir: string) => {
107107
}
108108

109109
export const getTutorialsData = (locale: string): ITutorial[] => {
110-
const currentDir = getContentRoot()
110+
const contentRoot = getContentRoot()
111111
const fullPath = join(
112-
currentDir,
112+
contentRoot,
113113
locale !== "en" ? `translations/${locale!}` : "",
114114
"developers/tutorials"
115115
)
@@ -120,7 +120,7 @@ export const getTutorialsData = (locale: string): ITutorial[] => {
120120

121121
tutorialData = languageTutorialFiles.map((dir) => {
122122
const filePath = join(
123-
currentDir,
123+
contentRoot,
124124
locale !== "en" ? `translations/${locale!}` : "",
125125
"developers/tutorials",
126126
dir,

0 commit comments

Comments
 (0)