Skip to content

Commit c6ee78d

Browse files
committed
feat(API-1892): Relocate apps homepage
Clean now unused 'build-apps-homepage' gulp task
1 parent 97744d4 commit c6ee78d

File tree

5 files changed

+42
-39
lines changed

5 files changed

+42
-39
lines changed
File renamed without changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="refresh" content="0; URL=/apps/homepage.html" />
5+
<!-- Hotjar Tracking Code for https://api.akeneo.com/ -->
6+
<script>
7+
(function(h,o,t,j,a,r){
8+
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
9+
h._hjSettings={hjid:2599654,hjsv:6};
10+
a=o.getElementsByTagName('head')[0];
11+
r=o.createElement('script');r.async=1;
12+
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
13+
a.appendChild(r);
14+
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
15+
</script>
16+
</head>
17+
<body>
18+
<script>
19+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
20+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
21+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
22+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
23+
24+
ga('create', 'UA-35417741-5', 'auto');
25+
ga('send', 'pageview');
26+
</script>
27+
</body>
28+
</html>

src/index.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="hidden-xs hidden-sm col-md-6 col-lg-5">
1010
<h1 class="emphasis">Build Apps to ease the connection with Akeneo PIM</h1>
1111
<p>Follow our step-by-step guide to create an app and use OAuth 2.0</p>
12-
<a class="btn btn-primary" href="/apps.html">Build an App</a>
12+
<a class="btn btn-primary" href="/apps/homepage.html">Build an App</a>
1313
</div>
1414
<div class="hidden-xs hidden-sm col-md-6 col-lg-7">
1515
<img class="img-responsive img-banner" src="img/illustrations/illus--main-banner-apps.svg"></img>

src/partials/layout.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<li class="dropdown{{#if active_apps}} active{{/if}}">
4747
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Apps <span class="caret"></span></a>
4848
<ul class="dropdown-menu">
49-
<li class="dropdown-title"><a href="/apps.html">Apps</a></li>
50-
<li><a href="/apps.html">Start building your App</a></li>
49+
<li class="dropdown-title"><a href="/apps/homepage.html">Apps</a></li>
50+
<li><a href="/apps/homepage.html">Start building your App</a></li>
5151
<li><a href="/apps/overview.html">Overview</a></li>
5252
<li><a href="/apps/authentication-and-authorization.html">Authentication and authorization</a></li>
5353
<li><a href="/apps/catalogs.html">Catalogs for Apps (beta)</a></li>

tasks/build-doc.js

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -591,41 +591,9 @@ gulp.task('build-events-api', ['clean-dist','less'], function () {
591591
}
592592
);
593593

594-
gulp.task('build-apps-homepage', ['clean-dist','less'], function () {
595-
var pages = {
596-
'overview.md': 'Overview',
597-
'authentication-and-authorization.md': 'Authentication and authorization',
598-
'catalogs.md': 'Catalogs for Apps <span class="label label-beta">Beta</span>',
599-
'app-developer-tools.md': 'Developer tools',
600-
'app-concepts-and-use-cases.md': 'App concepts and use cases'
601-
};
602-
603-
var isOnePage = false;
604-
605-
return gulp.src('content/apps/apps.md')
606-
.pipe(flatmap(function(stream, file){
607-
return gulp.src('content/apps/apps.md')
608-
.pipe(insert.wrap("::::: mainContent\n", "\n:::::"))
609-
.pipe(insert.prepend(getTocMarkdown(isOnePage, pages, path.basename(file.path), '/apps') + "\n"))
610-
.pipe(gulpMarkdownIt(md))
611-
.pipe(gulp.dest('tmp/apps/'))
612-
.on('end', function () {
613-
return gulp.src('src/partials/apps.handlebars')
614-
.pipe(gulpHandlebars({
615-
active_apps: true,
616-
mainContent: fs.readFileSync('tmp/apps/' + path.basename(file.path).replace(/\.md/, '.html'))
617-
}, {
618-
partialsDirectory: ['./src/partials']
619-
}))
620-
.pipe(rename(path.basename(file.path).replace(/\.md/, '.html')))
621-
.pipe(revReplace({manifest: gulp.src("./tmp/rev/rev-manifest.json")}))
622-
.pipe(gulp.dest('./dist'));
623-
})
624-
}));
625-
});
626-
627594
gulp.task('build-apps', ['clean-dist','less'], function () {
628595
var pages = {
596+
'homepage.md': 'Start building your App',
629597
'overview.md': 'Overview',
630598
'authentication-and-authorization.md': 'Authentication and authorization',
631599
'catalogs.md': 'Catalogs for Apps <span class="label label-beta">Beta</span>',
@@ -635,9 +603,9 @@ gulp.task('build-apps', ['clean-dist','less'], function () {
635603

636604
var isOnePage = false;
637605

638-
return gulp.src(['content/apps/*.md','!content/apps/apps.md'])
606+
return gulp.src(['content/apps/*.md'])
639607
.pipe(flatmap(function(stream, file){
640-
return gulp.src(['content/apps/*.md','!content/apps/apps.md'])
608+
return gulp.src(['content/apps/*.md'])
641609
.pipe(insert.wrap("::::: mainContent\n", "\n:::::"))
642610
.pipe(insert.prepend(getTocMarkdown(isOnePage, pages, path.basename(file.path), '/apps') + "\n"))
643611
.pipe(gulpMarkdownIt(md))
@@ -659,8 +627,9 @@ gulp.task('build-apps', ['clean-dist','less'], function () {
659627
}
660628
);
661629

662-
gulp.task('build-redirections',[
630+
gulp.task('build-redirections', [
663631
'to-get-your-app-token-redirection',
632+
'to-apps-homepage'
664633
]);
665634

666635
gulp.task('to-get-your-app-token-redirection', ['clean-dist','less'], function () {
@@ -669,6 +638,12 @@ gulp.task('to-get-your-app-token-redirection', ['clean-dist','less'], function (
669638
.pipe(gulp.dest('./dist/apps'))
670639
});
671640

641+
gulp.task('to-apps-homepage', ['clean-dist', 'less'], function () {
642+
return gulp.src('content/redirections/to-apps-homepage.html')
643+
.pipe(rename('apps.html'))
644+
.pipe(gulp.dest('./dist'))
645+
});
646+
672647
gulp.task('build-concepts', ['clean-dist','less'], function () {
673648

674649
var pages = {

0 commit comments

Comments
 (0)