Renames url filter to url
This commit is contained in:
parent
cb83242ac7
commit
9fe4905608
@ -31,7 +31,7 @@ module.exports = function(config) {
|
||||
rssDate: dateObj => {
|
||||
return dateToISO(dateObj);
|
||||
},
|
||||
absoluteUrl: url => {
|
||||
url: url => {
|
||||
// If your blog lives in a subdirectory, change this:
|
||||
let rootDir = "/";
|
||||
if( !url || url === "/" ) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
<a href="/""><img src="/img/logo.png" class="logo"></a>
|
||||
<ul class="nav">
|
||||
{%- for nav in collections.nav -%}
|
||||
<li class="nav-item"><a href="{{ nav.url | absoluteUrl }}">{{ nav.data.navtitle }}</a></li>
|
||||
<li class="nav-item"><a href="{{ nav.url | url }}">{{ nav.data.navtitle }}</a></li>
|
||||
{%- endfor -%}
|
||||
</header>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<footer>
|
||||
<p><em><a href="/feed/">Subscribe to my feed</a></em></p>
|
||||
<p><em>Current page: <code>{{ page.url }}</code></em></p>
|
||||
<p><em>Current page: <code>{{ page.url | url }}</code></em></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@ -2,7 +2,7 @@
|
||||
<ul>
|
||||
{%- for post in posts -%}
|
||||
<li{% if post.url == url %} class="post-active"{% endif %}>
|
||||
<a href="{{ post.url | absoluteUrl }}">{{ post.data.title }}</a>
|
||||
<a href="{{ post.url | url }}">{{ post.data.title }}</a>
|
||||
Tags: {{ post.data.tags | join(", ") }}
|
||||
{%- if post.url == url %}
|
||||
(You are here)
|
||||
|
Loading…
Reference in New Issue
Block a user