You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/04/22 14:24:52 UTC
[camel-website] branch master updated: fix: make sure to use
relative links in header nav
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push:
new d44c307 fix: make sure to use relative links in header nav
d44c307 is described below
commit d44c30741c07fc7893ee43af71f19a07320c4099
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Apr 22 16:19:55 2019 +0200
fix: make sure to use relative links in header nav
---
antora-ui-camel/src/partials/header-content.hbs | 10 +++++-----
menu.js | 6 ++++--
site.yml | 2 +-
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/antora-ui-camel/src/partials/header-content.hbs b/antora-ui-camel/src/partials/header-content.hbs
index f937a26..60fd97d 100644
--- a/antora-ui-camel/src/partials/header-content.hbs
+++ b/antora-ui-camel/src/partials/header-content.hbs
@@ -1,7 +1,7 @@
<header class="header">
<nav class="navbar shadow border-bottom">
<div class="navbar-brand">
- <a class="navbar-item nav-logo" href="{{or site.url (or siteRootUrl siteRootPath)}}" title="{{site.title}}"></a>
+ <a class="navbar-item nav-logo" href="{{siteRootPath}}" title="{{site.title}}"></a>
<button class="navbar-burger" data-target="topbar-nav">
<span></span>
<span></span>
@@ -11,17 +11,17 @@
<div id="topbar-nav" class="navbar-menu">
<div class="navbar-end">
{{#withMenuData}}
- {{#each items}}
+ {{#each @items}}
{{#if children}}
<div class="navbar-item has-dropdown is-hoverable">
- <a class="navbar-link" href="{{or site.url (or siteRootUrl siteRootPath)}}{{url}}">{{name}}</a>
+ <a class="navbar-link" href="{{../../siteRootPath}}{{url}}">{{name}}</a>
{{else}}
- <a class="navbar-item" href="{{or site.url (or siteRootUrl siteRootPath)}}{{url}}">{{name}}</a>
+ <a class="navbar-item" href="{{../../siteRootPath}}{{url}}">{{name}}</a>
{{/if}}
{{#if children}}
<div class="navbar-dropdown">
{{#each children}}
- <a class="navbar-item" href="{{or site.url (or siteRootUrl siteRootPath)}}{{url}}">{{name}}</a>
+ <a class="navbar-item" href="{{../../../siteRootPath}}{{url}}">{{name}}</a>
{{/each}}
</div>
{{/if}}
diff --git a/menu.js b/menu.js
index 8707bf9..1801200 100644
--- a/menu.js
+++ b/menu.js
@@ -18,8 +18,10 @@ const createMenu = item => {
const menuData = mainMenu.filter(item => typeof(item.parent) === 'undefined').map(createMenu);
Handlebars.registerHelper('withMenuData', (options) => {
- return options.fn({
- items: menuData
+ return options.fn(this, {
+ data: {
+ items: menuData
+ }
});
});
diff --git a/site.yml b/site.yml
index 5e75874..a0071b8 100644
--- a/site.yml
+++ b/site.yml
@@ -1,6 +1,6 @@
site:
title: Apache Camel
- url: https://camel.apache.org/staging/
+ url: https://camel.apache.org/staging
start_page: manual::index.adoc
content: