summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Allen <dan@opendevise.com>2018-02-06 21:09:28 -0700
committerSarah White <sarah@opendevise.com>2018-02-07 17:25:33 +0000
commitd7c78e2172b47c7fd8e1b24606409ea0aa2fa149 (patch)
tree61a1635a97a33d9d39edaf94341761261fc8ca76 /src
parent08705171b18b379491caf79054191e0e2b7aab1b (diff)
downloadalpine-antora-theme-d7c78e2172b47c7fd8e1b24606409ea0aa2fa149.tar.bz2
alpine-antora-theme-d7c78e2172b47c7fd8e1b24606409ea0aa2fa149.tar.xz
fix missing component title in breadcrumbs
Diffstat (limited to 'src')
-rw-r--r--src/helpers/not.js3
-rw-r--r--src/partials/breadcrumbs.hbs8
2 files changed, 7 insertions, 4 deletions
diff --git a/src/helpers/not.js b/src/helpers/not.js
new file mode 100644
index 0000000..8b3aa91
--- /dev/null
+++ b/src/helpers/not.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (val) => !val
diff --git a/src/partials/breadcrumbs.hbs b/src/partials/breadcrumbs.hbs
index bee715a..20329f8 100644
--- a/src/partials/breadcrumbs.hbs
+++ b/src/partials/breadcrumbs.hbs
@@ -1,10 +1,10 @@
<nav class="crumbs" role="navigation" aria-label="breadcrumbs">
<ul>
- {{#if component.title}}
- {{#unless (or component.root (eq page.breadcrumbs.0.content component.title))}}
- <li class="crumb"><a href="{{{relativize page.url component.url}}}">{{{component.title}}}</a></li>
- {{/unless}}
+ {{#with page.component}}
+ {{#if (and ./title (not (or ./root (eq @root.page.breadcrumbs.0.content ./title))))}}
+ <li class="crumb"><a href="{{{relativize @root.page.url ./url}}}">{{{./title}}}</a></li>
{{/if}}
+ {{/with}}
{{#each page.breadcrumbs}}
<li class="crumb">
{{~#if (and ./url (eq ./urlType 'internal'))~}}