Skip to content

Commit

Permalink
tweak tag links, absolute_url
Browse files Browse the repository at this point in the history
to avoid dev bugs on diff jekyll versions or servers
  • Loading branch information
evanwill committed Nov 9, 2023
1 parent 527de3d commit b560ba2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="stylesheet" href="{{ '/assets/lib/fontawesome-free/css/all.min.css' | relative_url }}" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat|Montserrat:600&display=swap" rel="stylesheet">

<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}" type="text/css">
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}" type="text/css">

{% if site.noindex == true or page.noindex == true %}<meta name="robots" content="noindex">{% endif %}
{% if jekyll.environment == "production" %}
Expand Down
7 changes: 4 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
<a class="nav-link text-white" href="https://collectionbuilder.github.io/cb-docs/">Documentation</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="{{ '/tutorials.html' | absolute_url }}">Tutorials</a>
<a class="nav-link text-white" href="{{ '/tutorials.html' | relative_url }}">Tutorials</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="{{ '/blog/' | relative_url }}">Blog</a>
</li>
<li class="nav-item d-none">
<!--
<li class="nav-item">
<a class="nav-link text-white" href="#" data-trigger="focus" data-toggle="popover" title="CollectionBuilder is Free" data-placement="bottom" data-html=true data-content="No subscriptions. <br> No data harvesting. <br> Totally Customizable.">Pricing</a>
</li>
</li>-->
<li class="nav-item">
<a class="nav-link text-white" href="{{ 'about.html' | relative_url }}">About</a>
</li>
Expand Down
15 changes: 6 additions & 9 deletions _layouts/home-beautiful.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,28 @@
{% if site.feed_show_excerpt == false %}
{% endif %}

<a href="{{ post.url | absolute_url }}">
<a href="{{ post.url | relative_url }}">
<h2 class="post-title">{{ post.title | strip_html }}</h2>
</a>

<p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Written by {{ post.author }} | Posted on {{ post.date | date: date_format }}
</p>




<div class="post-entry">
{{post.short_description}}
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a>
<a href="{{ post.url | relative_url }}" class="post-read-more">[Read&nbsp;More]</a>
</div>


{% if site.feed_show_tags != false and post.tags.size > 0 %}
<div class="blog-tags">
<span>Tags:</span>
<!-- role="list" needed so that `list-style: none` in Safari doesn't remove the list semantics -->
<ul class="d-inline list-inline" role="list">
{% for tag in post.tags %}
<li class="list-inline-item">
<a href="{{ '/blog/tags.html' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
<a href="{{ '/blog/tags.html' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -54,12 +51,12 @@ <h2 class="post-title">{{ post.title | strip_html }}</h2>
<ul class="pagination main-pager">
{% if paginator.previous_page %}
<li class="page-item previous">
<a class="page-link" href="{{ paginator.previous_page_path | absolute_url }}">&larr; Newer Posts</a>
<a class="page-link" href="{{ paginator.previous_page_path | relative_url }}">&larr; Newer Posts</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li class="page-item next">
<a class="page-link" href="{{ paginator.next_page_path | absolute_url }}">Older Posts &rarr;</a>
<a class="page-link" href="{{ paginator.next_page_path | relative_url }}">Older Posts &rarr;</a>
</li>
{% endif %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>{{ page.title }}</h1>
<div class="blog-tags">
<span>Tags:</span>
{% for tag in page.tags %}
<a href="{{ 'blog/tags' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
<a href="{{ 'blog/tags.html' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
{% endfor %}
</div>
{% endif %}
Expand Down

0 comments on commit b560ba2

Please sign in to comment.