@@ -23,8 +23,8 @@ function getCurrentDir() {
23
23
}
24
24
25
25
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 )
28
28
// Temporal list of content pages allowed to be compiled
29
29
// When a content page is migrated (and he components being used), should be added to this list
30
30
const temporalAllowedPages = [
@@ -293,12 +293,12 @@ const getPostSlugs = (dir: string, files: string[] = []) => {
293
293
if ( fileExtension === ".md" ) {
294
294
// If it is a .md file (allowed content page), push the path to the files array
295
295
for ( const page of temporalAllowedPages ) {
296
- const fullPagePath = join ( cdir , page )
296
+ const fullPagePath = join ( currentDir , page )
297
297
298
298
if ( name . includes ( fullPagePath ) ) {
299
299
files . push (
300
300
toPosixPath (
301
- fullPagePath . replace ( cdir , "" ) . replace ( "/index.md" , "" )
301
+ fullPagePath . replace ( currentDir , "" ) . replace ( "/index.md" , "" )
302
302
)
303
303
)
304
304
}
@@ -321,8 +321,8 @@ export const getContentBySlug = (slug: string) => {
321
321
}
322
322
}
323
323
324
- const dir = getCurrentDir ( )
325
- let fullPath = toPosixPath ( join ( dir , realSlug ) )
324
+ const currentDir = getCurrentDir ( )
325
+ let fullPath = toPosixPath ( join ( currentDir , realSlug ) )
326
326
let contentNotTranslated = false
327
327
328
328
// If content is not translated, use english content fallback
@@ -352,9 +352,9 @@ export const getContent = (dir: string) => {
352
352
}
353
353
354
354
export const getTutorialsData = ( locale : string ) : ITutorial [ ] => {
355
- const dir = getCurrentDir ( )
355
+ const currentDir = getCurrentDir ( )
356
356
const fullPath = join (
357
- dir ,
357
+ currentDir ,
358
358
locale !== "en" ? `translations/${ locale ! } ` : "" ,
359
359
"developers/tutorials"
360
360
)
@@ -365,7 +365,7 @@ export const getTutorialsData = (locale: string): ITutorial[] => {
365
365
366
366
tutorialData = languageTutorialFiles . map ( ( dir ) => {
367
367
const filePath = join (
368
- dir ,
368
+ currentDir ,
369
369
locale !== "en" ? `translations/${ locale ! } ` : "" ,
370
370
"developers/tutorials" ,
371
371
dir ,
0 commit comments