Skip to content

Commit df380b9

Browse files
committed
fix var name
1 parent af65246 commit df380b9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/lib/utils/md.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function getCurrentDir() {
2323
}
2424

2525
const getPostSlugs = (dir: string, files: string[] = []) => {
26-
const cdir = getCurrentDir()
27-
const contentDir = join(cdir, dir)
26+
const currentDir = getCurrentDir()
27+
const contentDir = join(currentDir, dir)
2828
// Temporal list of content pages allowed to be compiled
2929
// When a content page is migrated (and he components being used), should be added to this list
3030
const temporalAllowedPages = [
@@ -293,12 +293,12 @@ const getPostSlugs = (dir: string, files: string[] = []) => {
293293
if (fileExtension === ".md") {
294294
// If it is a .md file (allowed content page), push the path to the files array
295295
for (const page of temporalAllowedPages) {
296-
const fullPagePath = join(cdir, page)
296+
const fullPagePath = join(currentDir, page)
297297

298298
if (name.includes(fullPagePath)) {
299299
files.push(
300300
toPosixPath(
301-
fullPagePath.replace(cdir, "").replace("/index.md", "")
301+
fullPagePath.replace(currentDir, "").replace("/index.md", "")
302302
)
303303
)
304304
}
@@ -321,8 +321,8 @@ export const getContentBySlug = (slug: string) => {
321321
}
322322
}
323323

324-
const dir = getCurrentDir()
325-
let fullPath = toPosixPath(join(dir, realSlug))
324+
const currentDir = getCurrentDir()
325+
let fullPath = toPosixPath(join(currentDir, realSlug))
326326
let contentNotTranslated = false
327327

328328
// If content is not translated, use english content fallback
@@ -352,9 +352,9 @@ export const getContent = (dir: string) => {
352352
}
353353

354354
export const getTutorialsData = (locale: string): ITutorial[] => {
355-
const dir = getCurrentDir()
355+
const currentDir = getCurrentDir()
356356
const fullPath = join(
357-
dir,
357+
currentDir,
358358
locale !== "en" ? `translations/${locale!}` : "",
359359
"developers/tutorials"
360360
)
@@ -365,7 +365,7 @@ export const getTutorialsData = (locale: string): ITutorial[] => {
365365

366366
tutorialData = languageTutorialFiles.map((dir) => {
367367
const filePath = join(
368-
dir,
368+
currentDir,
369369
locale !== "en" ? `translations/${locale!}` : "",
370370
"developers/tutorials",
371371
dir,

0 commit comments

Comments
 (0)