-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a page for each tag (closes #24)
Merge pull request #26 from Samasaur1/tag-pages. This PR also: - extracts the HTML for a post in the list of posts to an include, so it can now be used on other pages - shows the "last updated date" for posts that have it - removes the list of "posts by tag" (superseded by the tag pages) and replaces it with a list of tags, showing the number of posts tagged with that tag
- Loading branch information
Showing
9 changed files
with
133 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ gem "jekyll" | |
gem "webrick", "~> 1.7" | ||
gem 'jekyll-feed' | ||
gem 'jekyll-seo-tag' | ||
gem 'jekyll-datapage-generator' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<{{ include.tag | default: "h3" }}> | ||
<a href="{{ post.url }}">{{ post.title }}</a> | ||
<span style="font-size: 50%;"> | ||
<span class="text-muted">{{ post.date | date_to_string }} </span> | ||
</span> | ||
<span style="font-size: 55%;"> | ||
{% if post.tags[0] %} | ||
{% for tag in post.tags %} | ||
{% assign css-class = "badge-secondary" %} | ||
{% for site_tag in site.data.tags %} | ||
{% if site_tag.name == tag %} | ||
{% if site_tag.class %} | ||
{% assign css-class = site_tag.class %} | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
{% capture link %}/tags/{{ tag | replace: " ", "-" }}{% endcapture %} | ||
<a href="{{ link | relative_url }}" class="badge {{ css-class }}">{{ tag }}</a> | ||
{% endfor %} | ||
{% endif %} | ||
</span> | ||
{% if post.last_updated %} | ||
<span style="font-size: 50%;"> | ||
<span class="text-muted"> updated {{ post.last_updated | date_to_string }}</span> | ||
</span> | ||
{% endif %} | ||
</{{ include.tag | default: "h3" }}> | ||
|
||
{{ post.excerpt }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
layout: default | ||
--- | ||
<div id="tag-info"> | ||
<h2>{{ page.title }}</h2> | ||
{% if page.description %} | ||
<p class="pb-0 mb-0">{{ page.description }}</p> | ||
{% endif %} | ||
</div> | ||
<hr class="mb-0 mt-0 pb-0 pt-0"/> | ||
<div id="tag-posts"> | ||
<h2>recent posts:</h2> | ||
<ul> | ||
{% for post in site.posts %} | ||
{% if post.tags contains page._name %} | ||
<li>{% include post.html tag="h4" %}</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters