diff --git a/nanoc/lib/mixin.rb b/nanoc/lib/mixin.rb index 7e2acc8..3b7608c 100644 --- a/nanoc/lib/mixin.rb +++ b/nanoc/lib/mixin.rb @@ -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 diff --git a/nanoc/lib/mixin/opengraph.rb b/nanoc/lib/mixin/opengraph.rb index c23e757..e9fd834 100644 --- a/nanoc/lib/mixin/opengraph.rb +++ b/nanoc/lib/mixin/opengraph.rb @@ -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"),