-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4379 from galaxyproject/lion-uaru
Topic embeds, topics by tag
- Loading branch information
Showing
20 changed files
with
502 additions
and
71 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
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: embed | ||
--- | ||
|
||
<section class="tutorials-list {{ page.topic_name }} topic-type-{{ topic.type }}"> | ||
|
||
{% assign topic = site.data[page.topic_name] | default: page.topic %} | ||
{% assign topic_material = site | list_materials_structured:page.topic_name %} | ||
|
||
{% for subtopic in topic_material %} | ||
{% if subtopic[0] != "__FLAT__" %} | ||
<h3 id="st-{{ subtopic[0] | slugify }}">{{ subtopic[1].subtopic.title }}</h3> | ||
<p>{{ subtopic[1].subtopic.description }}</p> | ||
{% endif %} | ||
|
||
{% include _includes/tutorial_list.html sub=subtopic %} | ||
{% endfor %} | ||
|
||
{{ content }} | ||
</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
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,46 @@ | ||
require './_plugins/jekyll-topic-filter' | ||
|
||
module Jekyll | ||
## | ||
# This class generates the GTN's author pags | ||
class TagPageGenerator < Generator | ||
safe true | ||
|
||
## | ||
# This generates the author pages | ||
# Params | ||
# +site+:: The site object | ||
def generate(site) | ||
Jekyll.logger.info '[GTN/SyntheticTopics] Generating By-Tag Indexes' | ||
TopicFilter.list_all_tags(site).map do |tag| | ||
site.data["by_tag_#{tag}"] = { | ||
'name' => "by_tag_#{tag}", | ||
'type' => 'use', | ||
'title' => tag, | ||
'summary' => "Tutorials covering #{tag}", | ||
'tag_based' => true, | ||
'hidden' => true, | ||
} | ||
|
||
topic_index = PageWithoutAFile.new(site, '', "tags/#{tag}", 'index.md') | ||
topic_index.content = '' | ||
topic_index.data['layout'] = 'topic' | ||
topic_index.data['topic_name'] = "by_tag_#{tag}" | ||
topic_index.data['topic'] = site.data["by_tag_#{tag}"] | ||
|
||
site.pages << topic_index | ||
end | ||
|
||
Jekyll.logger.info '[GTN/SyntheticTopics] Generating By-Tag Embeds' | ||
TopicFilter.list_all_tags(site).map do |tag| | ||
topic_index = PageWithoutAFile.new(site, '', "tags/#{tag}", 'embed.html') | ||
topic_index.content = '' | ||
topic_index.data['layout'] = 'topic-embed' | ||
topic_index.data['topic_name'] = "by_tag_#{tag}" | ||
topic_index.data['topic'] = site.data["by_tag_#{tag}"] | ||
|
||
site.pages << topic_index | ||
end | ||
end | ||
end | ||
end |
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
Oops, something went wrong.