removing gh-pages branch and putting everything in master
This commit is contained in:
28
_includes/related_pages.html
Normal file
28
_includes/related_pages.html
Normal file
@ -0,0 +1,28 @@
|
||||
<hr />
|
||||
|
||||
<!-- code doesn't work -- tags work much better, but leaving this here in case i figure out the issue. -->
|
||||
|
||||
<h3>Related Pages</h3>
|
||||
|
||||
<ul id="related_pages">
|
||||
|
||||
{% assign currentTitle = page.title %}
|
||||
{% for tag in page.tags %}
|
||||
{% assign counter = '0' %}
|
||||
{% for page in site.pages %}
|
||||
{% if page.tags contains tag and page.title != currentTitle and counter < '10' %}
|
||||
{% capture counter %}{{ counter | plus:'1' }}{% endcapture %}
|
||||
{% assign pageList = "" | split: "|" %}
|
||||
{{ pageList | push: page.title }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% assign unique_pageList = pageList | uniq %}
|
||||
{% for item in unique_pageList %}
|
||||
<li><a href="{{ item.permalink | prepend: site.baseurl }}">{{item.title}}</a></li>
|
||||
{% endfor %}
|
||||
{% if counter == '0' %}<span class="noOtherPages"><p>No other pages.</p></span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user