Add rel alternate links to profile pages, linking to activitypub

representations
This commit is contained in:
James Smith committed 2026-10-14 12:33:00 +01:00
1 parent 8552063555
commit 45e6ecdcdc
3 files changed
+3

No files matched your search

+1
View File
@@ -2,6 +2,7 @@
<%= tag.meta property: "og:type", content: "website" %>
<%= tag.meta name: "description", content: truncate(sanitize(@collection.caption), length: 80) if @collection.caption.present? %>
<%= tag.link rel: "alternate", type: Mime[:oembed], href: collection_url(@collection, format: :oembed), title: @collection.name %>
<%= tag.link rel: "alternate", type: CGI.escapeHTML(Mime[:activitypub]), href: @collection.fedipub_actor&.federated_url if SiteSettings.federation_enabled? %>
<% end %>
<%= content_for :page_header do %>
+1
View File
@@ -2,6 +2,7 @@
<%= tag.meta property: "og:type", content: "profile" %>
<%= tag.meta name: "description", content: truncate(sanitize(@creator.caption), length: 80) if @creator.caption.present? %>
<%= tag.link rel: "alternate", type: Mime[:oembed], href: creator_url(@creator, format: :oembed), title: @creator.name %>
<%= tag.link rel: "alternate", type: CGI.escapeHTML(Mime[:activitypub]), href: @creator.fedipub_actor&.federated_url if SiteSettings.federation_enabled? %>
<% end %>
<%= content_for :page_header do %>
+1
View File
@@ -4,6 +4,7 @@
<%= tag.meta name: "description", content: truncate(sanitize(@model.notes), length: 80) if @model.notes.present? %>
<%= tag.meta name: "fediverse:creator", content: @model.creator.fedipub_actor.at_address if @model.creator %>
<%= tag.link rel: "alternate", type: Mime[:oembed], href: model_url(@model, format: :oembed), title: @model.name %>
<%= tag.link rel: "alternate", type: CGI.escapeHTML(Mime[:activitypub]), href: @model.fedipub_actor&.federated_url if SiteSettings.federation_enabled? %>
<%- if @model.entrypoint %>
<%= tag.link rel: "alternate", as: "spatial-entrypoint", type: @model.entrypoint.mime_type, href: model_model_file_raw_url(@model, @model.entrypoint.filename, anchor: @model.entrypoint_fragment) %>
<%- end %>