Last active
July 12, 2018 07:37
-
-
Save 867/298cc6ac8d13007c65670064a39ca1c0 to your computer and use it in GitHub Desktop.
公式ブログ用:Nunjucks : partial/_dochead.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- if pageT -%} | |
{%- set title = pageT + ' | ' + data.sitename -%}{%- else -%} | |
{%- set title = data.sitename -%} | |
{%- endif -%} | |
{%- if pageD -%} | |
{%- set description = pageD -%}{%- else -%} | |
{%- set description = data.meta.description -%} | |
{%- endif -%} | |
{%- if pageK -%} | |
{%- set keywords = pageK -%}{%- else -%} | |
{%- set keywords = data.meta.keywords -%} | |
{%- endif -%} | |
{%- if ogType -%} | |
{%- set ogType = ogType -%}{%- else -%} | |
{%- set ogType = data.og.type -%} | |
{%- endif -%} | |
{%- if ogImg -%} | |
{%- set ogImg = ogImg -%}{%- else -%} | |
{%- set ogImg = data.og.image -%} | |
{%- endif -%} | |
~ 省略 ~ | |
<meta charset="utf-8"> | |
<title>{{ title }}</title> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="description" content="{{ description }}"> | |
<meta name="keywords" content="{{ keywords }}"> | |
{%- if robots -%} | |
<meta name="robots" content="{{ robots }}"> | |
{%- endif -%} | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta property="og:type" content="{{ ogType }}"> | |
<meta property="og:image" content="{{ ogImg }}"> | |
<link rel="apple-touch-icon" href="/assets/img/common/apple-touch-icon.png"> | |
<link rel="shortcut icon" href="/assets/img/common/favicon.ico"> | |
<link rel="stylesheet" href="/assets/css/global.css"> | |
{%- block css -%}{%- endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment