Skip to content

Commit

Permalink
Enable Bluesky oEmbeds
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Nov 15, 2024
1 parent c15f5df commit 38c71bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/layouts/application.html+mobile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<script async defer src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async defer src="//www.instagram.com/embed.js" charset="utf-8"></script>
<script async defer src="https://secure.assets.tumblr.com/post.js"></script>
<script async defer src="https://embed.bsky.app/static/embed.js"></script>
<% end %>

<% if Sugar.config.google_analytics %>
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
<script async defer src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async defer src="//www.instagram.com/embed.js" charset="utf-8"></script>
<script async defer src="https://secure.assets.tumblr.com/post.js"></script>
<script async defer src="https://embed.bsky.app/static/embed.js"></script>
<% end %>

<%# Google Analytics %>
Expand Down
6 changes: 6 additions & 0 deletions config/initializers/oembed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@
OEmbed::Providers.register(provider)
end
end

OEmbed::Provider.new("https://embed.bsky.app/oembed").tap do |provider|
provider << "http://*.bsky.app/*"
provider << "https://*.bsky.app/*"
OEmbed::Providers.register(provider)
end

0 comments on commit 38c71bb

Please sign in to comment.