station 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 855d722d7675c85f38322a88faf214b6fe95bca283f49a2fc4dd2fab88a82f57
4
- data.tar.gz: a9c8a73711ef538ba69ee9c8f99b6fb8d777bf1cf9904665ffe2df8082416a28
3
+ metadata.gz: 2826874da55ef3bfaecc8c7e66b44d26f0e64561779c31f2552a8012b8add1b0
4
+ data.tar.gz: 1612ac03e4babbcca15a051ed7bf4f314265902fff843008a8aa449400021a21
5
5
  SHA512:
6
- metadata.gz: 2e0fd9fcc6673296efc45fb6e93d4b1829bf1a1d6e3d7f221a661113cd63e5f930c5ae67b0ae4f1ec034478315f9480e37baf7b472842b6fde6c0d07c931ec7f
7
- data.tar.gz: 3a5b0af9fe8675d16488bdc025574f5a8a56f8d21ffc11ffd1ff7f5440a976d62e9eec3356c93f6ce9053a8df80fa8d672b46c8d3d9c8c3d4693fce6df5a5933
6
+ metadata.gz: 85225d76dd5b603da7f0b4c4a4474fb2bcffe1ce494683b3c63105b4a39488738ea7bd265771dd128590a31909a9d839d4a84ab45242a7ed1529af9720466506
7
+ data.tar.gz: b7b1634ba19fdc5469b88fe1a04ccf379399e06d55fbcf293bf47f65918cd81484c22d316e103d9f8e3f99766baa0d5a9876bc6688745db78b8b339ffe8f119b
@@ -1,7 +1,7 @@
1
1
  class Blog::Blogpost
2
2
  attr_accessor :title, :description, :thumbnail, :author, :published, :published_at,
3
3
  :updated_at, :category, :tags, :link, :locale, :slug, :spotlight,
4
- :filename, :content, :header_img_url
4
+ :filename, :content, :header_img_url, :canonical
5
5
 
6
6
  CLOUDFRONT_BLOG_URL = 'https://d226lax1qjow5r.cloudfront.net/blog/'.freeze
7
7
  DEFAULT_VONAGE_LOGO_URL = 'https://s3.eu-west-1.amazonaws.com/developer.vonage.com/vonage-logo-images/vonage_logo_primary_white_1200x600.png'.freeze
@@ -13,6 +13,7 @@ class Blog::Blogpost
13
13
  @published = attributes['published'] || false
14
14
  @published_at = attributes['published_at']
15
15
  @updated_at = attributes['updated_at']
16
+ @canonical = attributes['canonical']
16
17
  @tags = attributes['tags'] || []
17
18
  @link = attributes['link'] || ''
18
19
  @filename = attributes['filename']
@@ -32,7 +32,7 @@ class BlogpostParser
32
32
  end
33
33
 
34
34
  def self.build_custom_attributes(frontmatter, filename, locale)
35
- frontmatter.except!('comments', 'redirect', 'canonical', 'old_categories')
35
+ frontmatter.except!('comments', 'redirect', 'old_categories')
36
36
 
37
37
  filename = File.basename(filename, '.md')
38
38
  year, month, day = frontmatter['published_at'].strftime('%y %m %d').split
@@ -1,6 +1,10 @@
1
1
  <% category = @blogpost.category %>
2
2
  <% author = @blogpost.author %>
3
3
 
4
+ <% content_for :canonical do %>
5
+ <%= @blogpost.canonical %>
6
+ <% end %>
7
+
4
8
  <div class="max-w-screen-xl mx-auto">
5
9
 
6
10
  <!-- Layout tweak for reading time position -->
@@ -85,9 +89,8 @@
85
89
  <% end %>
86
90
 
87
91
  <!-- Last Updated at -->
88
- <% if @blogpost.updated_at.present? %>
89
- <p class='Vlt-grey-darker'><strong>Last updated on <%= @blogpost.updated_at.strftime('%b %d, %Y') %></strong></p>
90
- <% end %>
92
+ <% updated = @blogpost.updated_at.present? ? @blogpost.updated_at : @blogpost.published_at %>
93
+ <p class='Vlt-grey-darker'><strong>Last updated on <%= updated.strftime('%b %d, %Y') %></strong></p>
91
94
 
92
95
  <!-- Raw content -->
93
96
  <div class="raw_blopost_content"><%= raw @blogpost.content %></div>
@@ -70,8 +70,11 @@
70
70
  </script>
71
71
  <% end %>
72
72
 
73
-
74
- <link rel="canonical" href="<%= canonical_url %>">
73
+ <% if content_for? :canonical %>
74
+ <link rel="canonical" href=<%= yield :canonical %> />
75
+ <% else %>
76
+ <link rel="canonical" href="<%= canonical_url %>">
77
+ <% end %>
75
78
 
76
79
  <%= javascript_include_tag 'application', defer: true %>
77
80
 
@@ -1 +1 @@
1
- {"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-05-12T13:54:20+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-05-12T13:54:20+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css":{"logical_path":"application.css","mtime":"2022-05-12T13:54:20+00:00","size":16708,"digest":"d54213e3f6d2bb7cf40da6bbf2ffc7a2ca853b13b04cf82848b8e12f448ebd8a","integrity":"sha256-1UIT4/bSu3z0Daa78v/HosqFOxOwTPgoSLjhL0SOvYo="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css"}}
1
+ {"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-05-24T13:40:30+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-05-24T13:40:30+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css":{"logical_path":"application.css","mtime":"2022-05-24T13:40:30+00:00","size":16708,"digest":"d54213e3f6d2bb7cf40da6bbf2ffc7a2ca853b13b04cf82848b8e12f448ebd8a","integrity":"sha256-1UIT4/bSu3z0Daa78v/HosqFOxOwTPgoSLjhL0SOvYo="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css"}}
@@ -1,3 +1,3 @@
1
1
  module NexmoDeveloper
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: station
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vonage DevRel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-12 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -731,7 +731,7 @@ files:
731
731
  - "./lib/nexmo_developer/public/android-chrome-512x512.png"
732
732
  - "./lib/nexmo_developer/public/apple-touch-icon-precomposed.png"
733
733
  - "./lib/nexmo_developer/public/apple-touch-icon.png"
734
- - "./lib/nexmo_developer/public/assets/.sprockets-manifest-ea570e4d19e8a027f983b920c76d3c80.json"
734
+ - "./lib/nexmo_developer/public/assets/.sprockets-manifest-472a5c39ab69f0c407eafe8a9cfff5b4.json"
735
735
  - "./lib/nexmo_developer/public/assets/application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css"
736
736
  - "./lib/nexmo_developer/public/assets/application-5ad987624692d5d292107a5458cd2847f300cb6b7234b56e7b68a272f353827b.css.gz"
737
737
  - "./lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js"