blog-generator 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bin/blog-generator.rb +1 -1
- data/lib/blog-generator/post.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be671ad043de1d364e12bb8515a5f040a054687b
|
4
|
+
data.tar.gz: 425ef4f0111617c8df5ab6778a9303ac67d9724f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9516667ffd5f5f35576f1322ce7ce79281395e9b9030595ca6990f96fa1725fe1fe14ae3293e8ea0e92a8b93b797d8589fa18d488df1986fe6261099f4ca25f8
|
7
|
+
data.tar.gz: d03fb84a1276c3621f8c3c531b6d86985d23b48550323553706d29317c756d61394f0e1861ae22f0b502106112482e2f12b444cbd90c538536d1a32a8a2625a1
|
data/README.md
CHANGED
data/bin/blog-generator.rb
CHANGED
@@ -64,7 +64,7 @@ Dir.chdir(OUTPUT_BASE_PATH) do
|
|
64
64
|
File.open('tags.json', 'w') do |file|
|
65
65
|
# [{title: x, slug: y}]
|
66
66
|
tags = generator.tags.map do |tag, _|
|
67
|
-
tag
|
67
|
+
tag.merge(path: "/tags/#{tag[:slug]}") ### TODO: some routing config.
|
68
68
|
end
|
69
69
|
file.puts(JSON.pretty_generate(tags))
|
70
70
|
end
|
data/lib/blog-generator/post.rb
CHANGED
@@ -23,6 +23,7 @@ module BlogGenerator
|
|
23
23
|
|
24
24
|
@metadata.merge!(slug: slug, published_on: published_on)
|
25
25
|
@metadata.merge!(excerpt: excerpt)
|
26
|
+
@metadata.merge!(path: "/posts/#{slug}") ### TODO: some routing config.
|
26
27
|
|
27
28
|
@metadata[:tags].map! do |tag|
|
28
29
|
{title: tag, slug: generate_slug(tag)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James C Russell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|