Skip to content

Commit 312ccd8

Browse files
committed
fix(API-1984): When navigating on 'Synchronize PIM products' guide, make 'Apps' menu entry as active instead of 'API resources'
1 parent dcd8006 commit 312ccd8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tasks/build-doc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ md.use(require("markdown-it-include"));
256256

257257
gulp.task('build-getting-started', ['clean-dist','less'], function () {
258258

259+
const synchronizePimProductsName = 'synchronize-pim-products';
259260
var pages = {
260261
'your-first-tutorial-4x': {
261262
gettingStartedName: 'your-first-tutorial',
@@ -362,7 +363,7 @@ gulp.task('build-getting-started', ['clean-dist','less'], function () {
362363
}
363364
},
364365
'synchronize-pim-products-6x': {
365-
gettingStartedName: 'synchronize-pim-products',
366+
gettingStartedName: synchronizePimProductsName,
366367
pimVersion: 'v6 / SaaS',
367368
title: 'Synchronize PIM products with your App',
368369
files: {
@@ -402,12 +403,15 @@ gulp.task('build-getting-started', ['clean-dist','less'], function () {
402403
.pipe(gulpMarkdownIt(md))
403404
.pipe(gulp.dest('tmp/getting-started/'))
404405
.on('end', function () {
406+
const gettingStartedName = pages[path.basename(path.dirname(file.path))].gettingStartedName;
407+
405408
return gulp.src('src/partials/getting-started.handlebars')
406409
.pipe(gulpHandlebars({
407-
active_api_resources: true,
410+
active_api_resources: gettingStartedName !== synchronizePimProductsName,
411+
active_apps: gettingStartedName === synchronizePimProductsName,
408412
title: pages[path.basename(path.dirname(file.path))].title,
409413
image: pages[path.basename(path.dirname(file.path))].image,
410-
gettingStartedName: pages[path.basename(path.dirname(file.path))].gettingStartedName,
414+
gettingStartedName: gettingStartedName,
411415
pimVersion: pages[path.basename(path.dirname(file.path))].pimVersion,
412416
availability: pages[path.basename(path.dirname(file.path))].availability,
413417
mainContent: fs.readFileSync('tmp/getting-started/' + path.basename(path.dirname(file.path)) + '/' + path.basename(file.path).replace(/\.md/, '.html'))

0 commit comments

Comments
 (0)