-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#324): refactor collections for topics
- Loading branch information
1 parent
61de505
commit b5bf9bc
Showing
5 changed files
with
177 additions
and
52 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
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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
{% set topics = collections | tagsInCollection(['writing'], ['stage/stub']) %} | ||
<section class="post-list post-list__topics"> | ||
<header class="post-list__inline-header"> | ||
<h3>All Topics ({{ topics.length }})</h3> | ||
<h3>All Topics ({{ collections.topics.length }})</h3> | ||
</header> | ||
<ol> | ||
{% for topic in topics %} | ||
<li><a href="/topic/{{ topic.name | slugify }}">{{ topic.name }}</a> ({{ topic.usages }})</li> | ||
{% for topic in collections.topics %} | ||
{% if topic.isSpecialTag === false %} | ||
<li><a href="{{ topic.permalink }}">{{ topic.name }}</a> ({{ topic.items.length }})</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ol> | ||
</section> | ||
|
||
<section class="post-list post-list__topics"> | ||
<header class="post-list__inline-header"> | ||
<h3>All Topics ({{ collections.topics.length }})</h3> | ||
</header> | ||
<ol> | ||
{% for topic in collections.topics %} | ||
{% if topic.isSpecialTag %} | ||
<li><a href="{{ topic.permalink }}">{{ topic.name }}</a> ({{ topic.items.length }})</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ol> | ||
</section> |
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,27 @@ | ||
/** | ||
* Series and Volumes | ||
* | ||
* This folder contains landing pages for long-running series, the idea here is | ||
* to group serial content such as tutorials under an index page. I also | ||
* want to make use of this for the Week In Review, in which case the different | ||
* years will be different _volumes_ of the same series. | ||
* | ||
*/ | ||
export default { | ||
// Do not include in RSS Feed | ||
excludeFromFeed: true, | ||
|
||
// Tagged as special topic type, these aren't regular pages | ||
tags: ['type/series'], | ||
|
||
// Do not display page meta data | ||
hide_meta: true, | ||
folder: ['series'], | ||
|
||
// TODO: complete eleventy computed data to be volume aware? | ||
eleventyComputed: { | ||
permalink(data) { | ||
return `series/${data.page.fileSlug}/`; | ||
}, | ||
}, | ||
} |
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