Skip to content

Commit 3125b3f

Browse files
committed
reverting the silly and flakey manual tag directory
1 parent e83a79b commit 3125b3f

58 files changed

Lines changed: 31 additions & 342 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_plugins/tag_page_generator.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module Jekyll
2+
class TagPage < Page
3+
def initialize(site, tag)
4+
@site = site
5+
@base = site.source
6+
@dir = "tag/#{Utils.slugify(tag)}"
7+
@name = "index.html"
8+
9+
process(@name)
10+
read_yaml(File.join(site.source, "_layouts"), "tag_index.html")
11+
12+
data["tag"] = tag
13+
data["title"] = "Tag: #{tag}"
14+
data["robots"] = "noindex, follow"
15+
end
16+
end
17+
18+
class TagPageGenerator < Generator
19+
safe true
20+
priority :low
21+
22+
def generate(site)
23+
return unless site.layouts.key?("tag_index")
24+
25+
tags = site.posts.docs.flat_map { |post| post.data["tags"] || [] }.uniq
26+
tags.each do |tag|
27+
site.pages << TagPage.new(site, tag)
28+
end
29+
end
30+
end
31+
end

tag/acroyoga/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/afghanistan/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/ai/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/android/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/art/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/augmented-reality/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/australia/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/austria/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

tag/automation/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)