From cc292c253856e21ef93d8c0f36129451b14dca8b Mon Sep 17 00:00:00 2001 From: malkoG Date: Sat, 20 Apr 2024 01:10:39 +0900 Subject: [PATCH] (core/wiki) Add placeholder for opengraph image --- frontend/styles/jit-refresh.css | 2 +- src/_layouts/wiki.erb | 6 ++++++ src/_partials/_head.erb | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/styles/jit-refresh.css b/frontend/styles/jit-refresh.css index 91017735..62901f8e 100644 --- a/frontend/styles/jit-refresh.css +++ b/frontend/styles/jit-refresh.css @@ -1 +1 @@ -/* 1649173983 */ \ No newline at end of file +/* 1713538023 */ \ No newline at end of file diff --git a/src/_layouts/wiki.erb b/src/_layouts/wiki.erb index 022209ce..7a044c3b 100644 --- a/src/_layouts/wiki.erb +++ b/src/_layouts/wiki.erb @@ -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?('/') %> + +<% end %> + <%= slot :toc do %> <%= toc resource.untransformed_content %> <% end %> diff --git a/src/_partials/_head.erb b/src/_partials/_head.erb index 077ffe17..606307d5 100644 --- a/src/_partials/_head.erb +++ b/src/_partials/_head.erb @@ -10,6 +10,7 @@ +<%= slotted :og_image %> <%= feed_meta %>