m1key_gallery_generator 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a30358754706ef9405263138b5c0336ad16ac466361ab64acf68ac929647f9e8
|
|
4
|
+
data.tar.gz: f96b1c652c1b55d90fc403be53bfa39b3c52566b91e1d21e670bb9b3b3e5a420
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c73d2e4e88ed2bd16640d2756eb7f2fd6ce11e2e165d0b92e0ecde827ea50fd6fd4e8ef75653860ebabdb53c00731365b455e7e3e9f91ef329b64a61fd314863
|
|
7
|
+
data.tar.gz: 482256bbb2965cfd30882d912e1895c0ece6c6b7df0208ae3bd9e18f0ad324a828dbc3f8bcfe99849e9e3c75c00c81b7231e755ee975712807d064a9dd3d705c
|
data/README.md
CHANGED
|
@@ -74,11 +74,11 @@ Build the gem.
|
|
|
74
74
|
|
|
75
75
|
Install the gem.
|
|
76
76
|
|
|
77
|
-
> gem install m1key_gallery_generator-0.3.
|
|
77
|
+
> gem install m1key_gallery_generator-0.3.8.gem
|
|
78
78
|
|
|
79
79
|
In your gallery directory, have a file called generate.bat that looks like this:
|
|
80
80
|
|
|
81
|
-
> ruby c:\Ruby34-x64\lib\ruby\gems\3.4.0\gems\m1key_gallery_generator-0.3.
|
|
81
|
+
> ruby c:\Ruby34-x64\lib\ruby\gems\3.4.0\gems\m1key_gallery_generator-0.3.8\bin\console . wait_on_error
|
|
82
82
|
|
|
83
83
|
## Development
|
|
84
84
|
|
|
@@ -95,7 +95,7 @@ To build gem:
|
|
|
95
95
|
> gem build m1key_gallery_generator.gemspec
|
|
96
96
|
|
|
97
97
|
To install gem:
|
|
98
|
-
> gem install m1key_gallery_generator-0.3.
|
|
98
|
+
> gem install m1key_gallery_generator-0.3.8.gem
|
|
99
99
|
|
|
100
100
|
To test gem:
|
|
101
101
|
> irb
|
data/bin/console
CHANGED
|
@@ -31,7 +31,7 @@ begin
|
|
|
31
31
|
|
|
32
32
|
gallery = ViewableGallery.new(gallery_config.title, gallery_config.description, gallery_config.slug,
|
|
33
33
|
gallery_config.sources, gallery_config.upload_date, gallery_config.map_url, gallery_config.map_title,
|
|
34
|
-
gallery_config.year, viewable_photos, gallery_config.small_print).
|
|
34
|
+
gallery_config.year, viewable_photos, gallery_config.small_print, gallery_config.blurb).
|
|
35
35
|
update_using(
|
|
36
36
|
add_tabs_before_every_description_line(3),
|
|
37
37
|
add_links_to_descriptions,
|
|
@@ -5,7 +5,7 @@ require_relative 'console_utils'
|
|
|
5
5
|
module GalleryGenerator
|
|
6
6
|
class GalleryConfig
|
|
7
7
|
|
|
8
|
-
attr_reader :title, :map_url, :map_title, :slug, :upload_date, :description, :sources, :year, :photos, :small_print
|
|
8
|
+
attr_reader :title, :map_url, :map_title, :slug, :upload_date, :description, :sources, :year, :photos, :small_print, :blurb
|
|
9
9
|
|
|
10
10
|
def initialize(yaml_config_file_name)
|
|
11
11
|
puts "Attempting to parse #{yaml_config_file_name} to read gallery configuration..."
|
|
@@ -27,6 +27,8 @@ module GalleryGenerator
|
|
|
27
27
|
puts "Gallery description is [#{compact(@description)}]."
|
|
28
28
|
@small_print = gallery_configuration['small_print']
|
|
29
29
|
puts "Small print is [#{@small_print}]."
|
|
30
|
+
@blurb = gallery_configuration['blurb']
|
|
31
|
+
puts "Gallery description is [#{compact(@blurb)}]."
|
|
30
32
|
|
|
31
33
|
@sources = gallery_configuration['sources']
|
|
32
34
|
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
7
7
|
<title><%= title %> — Photography and Art Portfolio by Michal Huniewicz</title>
|
|
8
|
-
<meta name="description" content="<%=
|
|
8
|
+
<meta name="description" content="<%= blurb %>" />
|
|
9
|
+
<link rel="canonical" href="https://www.m1key.me/photography/<%= slug %>" />
|
|
9
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
+
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
|
|
13
|
+
<link rel="dns-prefetch" href="https://fonts.gstatic.com" />
|
|
11
14
|
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&display=swap" rel="stylesheet" />
|
|
12
15
|
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;500;600;700&display=swap"
|
|
13
16
|
rel="preload" as="style" />
|
|
@@ -19,14 +22,14 @@
|
|
|
19
22
|
<meta property="og:locale" content="en_US" />
|
|
20
23
|
<meta property="og:type" content="website" />
|
|
21
24
|
<meta property="og:title" content="<%= title %> by Michal Huniewicz" />
|
|
22
|
-
<meta property="og:description" content="<%=
|
|
23
|
-
<meta property="og:url" content="https://www.m1key.me/" />
|
|
25
|
+
<meta property="og:description" content="<%= blurb %>" />
|
|
26
|
+
<meta property="og:url" content="https://www.m1key.me/photography/<%= slug %>" />
|
|
24
27
|
<meta property="og:image" content="https://www.m1key.me/photography/<%= slug %>/<%= slug %>_01.jpg" />
|
|
25
28
|
<meta property="og:image:alt" content="<%= title %> by Michal Huniewicz" />
|
|
26
29
|
|
|
27
30
|
<meta name="twitter:card" content="summary_large_image" />
|
|
28
31
|
<meta name="twitter:title" content="<%= title %> by Michal Huniewicz" />
|
|
29
|
-
<meta name="twitter:description" content="<%=
|
|
32
|
+
<meta name="twitter:description" content="<%= blurb %>" />
|
|
30
33
|
<meta name="twitter:image" content="https://www.m1key.me/photography/<%= slug %>/<%= slug %>_01.jpg" />
|
|
31
34
|
|
|
32
35
|
<!-- Breadcrumb structured data for SEO -->
|
|
@@ -52,12 +55,12 @@
|
|
|
52
55
|
"@type": "ImageObject",
|
|
53
56
|
"contentUrl" : "https://www.m1key.me/photography/<%= slug %>/<%= slug %>_<%= photo.id %>.jpg",
|
|
54
57
|
"caption": "<%= photo.title %>",
|
|
55
|
-
"width":
|
|
56
|
-
"height":
|
|
58
|
+
"width": <%= photo.metadata.width %>,
|
|
59
|
+
"height": <%= photo.metadata.height %>
|
|
57
60
|
}<% if (index + 1) == photos.size %><% else %>,<% end -%>
|
|
58
61
|
<% end %>
|
|
59
62
|
],
|
|
60
|
-
"description": "<%=
|
|
63
|
+
"description": "<%= blurb %>",
|
|
61
64
|
"keywords": "photography, art, portfolio, Michal Huniewicz, m1key.me, <%= title %>"
|
|
62
65
|
}
|
|
63
66
|
</script>
|
|
@@ -70,7 +73,7 @@
|
|
|
70
73
|
{
|
|
71
74
|
"@type": "ListItem",
|
|
72
75
|
"position": 1,
|
|
73
|
-
"name": "
|
|
76
|
+
"name": "Home",
|
|
74
77
|
"item": "https://www.m1key.me/"
|
|
75
78
|
},
|
|
76
79
|
{
|
|
@@ -158,7 +161,7 @@
|
|
|
158
161
|
<li><a href="https://www.m1key.me" class="nav-link">M1key.me</a></li>
|
|
159
162
|
<li><a href="https://www.m1key.me/photography/" class="nav-link">Photography</a></li>
|
|
160
163
|
<li><a href="https://www.m1key.me/about_me/" class="nav-link">About me</a></li>
|
|
161
|
-
<li><a href="https://www.flickr.com/photos/m1key-me/" rel="noopener noreferrer" class="nav-link">Flickr</a></li>
|
|
164
|
+
<li><a href="https://www.flickr.com/photos/m1key-me/" target="_blank" rel="noopener noreferrer" class="nav-link">Flickr</a></li>
|
|
162
165
|
</ul>
|
|
163
166
|
</nav>
|
|
164
167
|
|
|
@@ -2,8 +2,8 @@ require_relative 'string_utils'
|
|
|
2
2
|
|
|
3
3
|
module GalleryGenerator
|
|
4
4
|
class ViewableGallery
|
|
5
|
-
attr_reader :title, :description, :slug, :sources, :upload_date, :map_url, :map_title, :year, :photos, :small_print
|
|
6
|
-
def initialize(title, description, slug, sources, upload_date, map_url, map_title, year, viewable_photos, small_print)
|
|
5
|
+
attr_reader :title, :description, :slug, :sources, :upload_date, :map_url, :map_title, :year, :photos, :small_print, :blurb
|
|
6
|
+
def initialize(title, description, slug, sources, upload_date, map_url, map_title, year, viewable_photos, small_print, blurb)
|
|
7
7
|
@title = String.new(title)
|
|
8
8
|
@description = description
|
|
9
9
|
@slug = slug
|
|
@@ -14,6 +14,7 @@ module GalleryGenerator
|
|
|
14
14
|
@year = year
|
|
15
15
|
@photos = viewable_photos
|
|
16
16
|
@small_print = small_print
|
|
17
|
+
@blurb = blurb
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
def get_binding
|
|
@@ -29,7 +30,7 @@ module GalleryGenerator
|
|
|
29
30
|
|
|
30
31
|
ViewableGallery.new(updated_gallery.title, updated_gallery.description, updated_gallery.slug,
|
|
31
32
|
updated_gallery.sources, updated_gallery.upload_date, updated_gallery.map_url,
|
|
32
|
-
updated_gallery.map_title, updated_gallery.year, to_viewable_photos(updated_gallery.photos), updated_gallery.small_print)
|
|
33
|
+
updated_gallery.map_title, updated_gallery.year, to_viewable_photos(updated_gallery.photos), updated_gallery.small_print, updated_gallery.blurb)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
def to_viewable_photos(mutable_viewable_photos)
|
|
@@ -41,7 +42,7 @@ module GalleryGenerator
|
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
class MutableViewableGallery
|
|
44
|
-
attr_accessor :title, :description, :slug, :sources, :upload_date, :map_url, :map_title, :year, :photos, :small_print
|
|
45
|
+
attr_accessor :title, :description, :slug, :sources, :upload_date, :map_url, :map_title, :year, :photos, :small_print, :blurb
|
|
45
46
|
def initialize(viewable_gallery)
|
|
46
47
|
@title = viewable_gallery.title
|
|
47
48
|
@description = viewable_gallery.description
|
|
@@ -53,6 +54,7 @@ module GalleryGenerator
|
|
|
53
54
|
@year = viewable_gallery.year
|
|
54
55
|
@photos = to_mutable_viewable_photos(viewable_gallery.photos)
|
|
55
56
|
@small_print = viewable_gallery.small_print
|
|
57
|
+
@blurb = viewable_gallery.blurb
|
|
56
58
|
end
|
|
57
59
|
|
|
58
60
|
def to_mutable_viewable_photos(viewable_photos)
|