diff --git a/app/views/active_storage/blobs/_blob.html.erb b/app/views/active_storage/blobs/_blob.html.erb index 6ad1c8ba6ac06f84ce0c78ec30fdce2006851a6d..5cf68aa5f2c6b0cbca800f25186ae47cb85616f8 100644 --- a/app/views/active_storage/blobs/_blob.html.erb +++ b/app/views/active_storage/blobs/_blob.html.erb @@ -1,14 +1,14 @@ <figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>"> <% if blob.image? %> - <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %> + <%= image_tag blob.representation(resize_to_limit: '800x') %> <% elsif blob.video? %> <video> <source src="<%= rails_blob_path(blob) %>" type="<%= blob.content_type %>"> </video> <% else %> - <%= link_to blob, target: :blank do %> + <%= link_to polymorphic_url(blob), target: :blank do %> <% if blob.representable? %> - <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %> + <%= image_tag blob.representation(resize_to_limit: '800x') %> <% else %> <p> <span class="attachment__name"><%= blob.filename %></span> diff --git a/app/views/admin/communication/website/pages/jekyll.html.erb b/app/views/admin/communication/website/pages/jekyll.html.erb index 8d5582b042996db27d8b22135a353d1d868c50c9..c7ee6dace2e86200c5b6dbbda16b804bdeb7802c 100644 --- a/app/views/admin/communication/website/pages/jekyll.html.erb +++ b/app/views/admin/communication/website/pages/jekyll.html.erb @@ -3,6 +3,9 @@ title: "<%= @page.title %>" permalink: "<%= @page.path %>" identifier: "<%= @page.id %>" parent: "<%= @page.parent_id %>" +<% if @page.featured_image.attached? %> +image: "<%= @page.featured_image.blob.id %>" +<% end %> description: > <%= prepare_for_github @page.description %> text: > diff --git a/app/views/admin/communication/website/posts/jekyll.html.erb b/app/views/admin/communication/website/posts/jekyll.html.erb index 72ba139212956f54e6702b22d93b0c77bd442c45..054bc89882789ce17d5a6ab8f1db9487a3ef40d9 100644 --- a/app/views/admin/communication/website/posts/jekyll.html.erb +++ b/app/views/admin/communication/website/posts/jekyll.html.erb @@ -3,7 +3,7 @@ title: "<%= @post.title %>" date: <%= @post.published_at %> UTC slug: "<%= @post.slug %>" <% if @post.featured_image.attached? %> -image: "<%= @post.featured_image.blob.url %>" +image: "<%= @post.featured_image.blob.id %>" <% end %> description: > <%= prepare_for_github @post.description %>