Renames url filter to url

This commit is contained in:
Zach Leatherman 2018-01-16 21:20:54 -06:00
parent cb83242ac7
commit 9fe4905608
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ module.exports = function(config) {
rssDate: dateObj => { rssDate: dateObj => {
return dateToISO(dateObj); return dateToISO(dateObj);
}, },
absoluteUrl: url => { url: url => {
// If your blog lives in a subdirectory, change this: // If your blog lives in a subdirectory, change this:
let rootDir = "/"; let rootDir = "/";
if( !url || url === "/" ) { if( !url || url === "/" ) {

View File

@ -12,7 +12,7 @@
<a href="/""><img src="/img/logo.png" class="logo"></a> <a href="/""><img src="/img/logo.png" class="logo"></a>
<ul class="nav"> <ul class="nav">
{%- for nav in collections.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 -%} {%- endfor -%}
</header> </header>
@ -20,7 +20,7 @@
<footer> <footer>
<p><em><a href="/feed/">Subscribe to my feed</a></em></p> <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> </footer>
</body> </body>
</html> </html>

View File

@ -2,7 +2,7 @@
<ul> <ul>
{%- for post in posts -%} {%- for post in posts -%}
<li{% if post.url == url %} class="post-active"{% endif %}> <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(", ") }} Tags: {{ post.data.tags | join(", ") }}
{%- if post.url == url %} {%- if post.url == url %}
(You are here) (You are here)