Skip to content

Instantly share code, notes, and snippets.

@laiyenju
Created April 10, 2020 05:33
Show Gist options
  • Save laiyenju/cb883472b4e825bbde5db88f00f293fa to your computer and use it in GitHub Desktop.
Save laiyenju/cb883472b4e825bbde5db88f00f293fa to your computer and use it in GitHub Desktop.
以條件式決定顯圖方式
# 整合成條件式
{% if page.feature_image %}
<meta property="og:image" content="{{ site.url }}/{{ page.feature_image }}">
{% else %}
<meta property="og:image" content="{{ site.url }}/{{ site.favicon }}">
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment