Skip to content

Commit ef683d5

Browse files
authored
resolves #29 fix component order on 404 page (PR #35)
1 parent 9f61c2b commit ef683d5

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/helpers/siteStartPage.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
'use strict'
2+
3+
module.exports = ({ data: { root: { contentCatalog } } }) =>
4+
contentCatalog && contentCatalog.getSiteStartPage()

src/layouts/404.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</head>
66
<body class="status-404">
77
{{> header}}
8-
{{> body}}
8+
{{> body componentOrder=(lookup (lookup (lookup (siteStartPage) 'asciidoc') 'attributes') 'page-component-order')}}
99
{{> footer}}
1010
</body>
1111
</html>

src/layouts/default.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</head>
66
<body class="article{{#with (or page.attributes.role page.role)}} {{{this}}}{{/with}}">
77
{{> header}}
8-
{{> body}}
8+
{{> body componentOrder=page.attributes.component-order}}
99
{{> footer}}
1010
</body>
1111
</html>

src/partials/nav-explore.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</div>
77
{{/if}}
88
<ul class="components">
9-
{{#each (rearrange site.components 'name' page.attributes.component-order)}}
9+
{{#each (rearrange site.components 'name' componentOrder)}}
1010
<li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}">
1111
<a class="title" href="{{{relativize ./url}}}">{{{./title}}}</a>
1212
{{#if (or ./versions.[1] (ne ./versions.[0].displayVersion 'current'))}}

0 commit comments

Comments
 (0)