Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixfox committed May 9, 2024
1 parent 3814b6f commit 099388b
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,27 @@
{% capture url_parts %} {{ page.url | remove: "/index.html" | replace:'/'," " }}{% endcapture %}
{% capture num_parts %}{{ url_parts | number_of_words | minus: 1 }}{% endcapture %}
{% assign previous="" %}
<ol class="breadcrumb";
<ol class="breadcrumb">
{% if num_parts == "0" or num_parts == "-1" %}
<li><a href="/">home</a> / </li>
{% else %}
<li><a href="/">home</a> / </li>

{% for unused in page.content limit:num_parts %}
{% capture first_word %}{{ url_parts | truncatewords:1 | remove:"..."}}{% endcapture %}
{% capture previous %}{{ previous }}/{{ first_word }}{% endcapture %}

<li><a href="{{previous}}">{{ first_word }}</a></li><li class="active">{{ page.title }}</li>

{% capture url_parts %}{{ url_parts | remove_first:first_word }}{% endcapture %}
{% endfor %}
{% endif %}
</ol>

<article>

<h1>{{page.title}}</h1>
<!--<small>Posted: {{page.posted}}</small>-->

{{content}}
<br>
<section class="social">
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</section>
</article>
<h1>{{page.title}}</h1>
<small>Posted: {{page.posted}}</small>
{{content}}
<br>
<section class="social">
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</section>
</article>

0 comments on commit 099388b

Please sign in to comment.