Skip to content

Commit

Permalink
(core/wiki) Add placeholder for opengraph image
Browse files Browse the repository at this point in the history
  • Loading branch information
malkoG committed Apr 19, 2024
1 parent 0c96a82 commit cc292c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/styles/jit-refresh.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* 1649173983 */
/* 1713538023 */
6 changes: 6 additions & 0 deletions src/_layouts/wiki.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
layout: default
---

<%= slot :og_image do %>
<% resource_path = resource.relative_url %>
<% resource_path = resource_path[..-2] if resource_path.end_with?('/') %>
<meta content="/assets/<%= resource_path %>.png" property="og:image">
<% end %>

<%= slot :toc do %>
<%= toc resource.untransformed_content %>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions src/_partials/_head.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</title>

<meta name="description" content="<%= metadata.description %>" />
<%= slotted :og_image %>
<%= feed_meta %>

<link rel="stylesheet" href="<%= asset_path 'css' %>" />
Expand Down

0 comments on commit cc292c2

Please sign in to comment.