_includes/header.html in jekyll-nagymaros-2.2.0 vs _includes/header.html in jekyll-nagymaros-3.0.0

- old
+ new

@@ -1,18 +1,24 @@ +{% if site.home %} +{% assign return = site.home | relative_url %} +{% else %} +{% assign return = '/' | relative_url %} +{% endif %} + <header class="bg-{{ site.data.skin.header.bg | default: 'gray-4' }}"> <div class="container"> <nav class="navbar navbar-expand-sm"> - <a class="navbar-brand" href="{{ site.url }}">{{ site.title }}</a> + <a class="navbar-brand" href="{{ return }}">{{ site.title }}</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navigation"> <div class="navbar-nav"> {% assign links = site.pages | sort: 'navorder' %} {% for link in links %} {% if link.navorder %} {% assign current = link.name | split: '.' | first %} - {% assign href = link.url | prepend: site.url %} + {% assign href = link.url | relative_url %} {% if page.layout == current %} <a class="nav-link active" aria-current="page" href="{{ href }}">{{ link.title }}</a> {% else %} <a class="nav-link" href="{{ href }}">{{ link.title }}</a> {% endif %} \ No newline at end of file