Add ability to cache-bust opengraph images
This commit is contained in:
parent
39ea3b4ee8
commit
29993663d7
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ module Mixin
|
|||
end
|
||||
|
||||
def revision
|
||||
cmd("git rev-parse HEAD").stdout.strip
|
||||
@rev ||= cmd("git", "rev-parse", "HEAD").stdout.strip
|
||||
end
|
||||
|
||||
def build_dir
|
||||
|
|
|
@ -12,7 +12,7 @@ module Mixin::OpenGraph
|
|||
{title: t(context.locale, "TheNobleQuran"),
|
||||
description: surah.name,
|
||||
url: "#{base_url}/#{context.locale}/#{surah.slug}/",
|
||||
image: "#{base_url}/images/og/#{surah.id}.png"}
|
||||
image: "#{base_url}/images/og/#{surah.id}.png?v=#{revision}"}
|
||||
when "redirect.html.erb", "surah-index.html.erb"
|
||||
{title: t(context.locale, "TheNobleQuran"),
|
||||
description: t(context.locale, "meta.index.description"),
|
||||
|
|
Loading…
Reference in a new issue