mirror-web/_includes/head.html
Harry Chen 964cb707d4
Add locale in og metadata
Signed-off-by: Harry Chen <i@harrychen.xyz>
2021-08-03 21:14:19 +08:00

90 lines
3.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% capture page_desc %}{% if include.metaDesc %}{{ include.metaDesc }} | {% if include.cattitle %}{{ include.cattitle }} | {% endif %}{% endif %}{{ site.title }}致力于为国内和校内用户提供高质量的开源软件镜像、Linux 镜像源服务,帮助用户更方便地获取开源软件。本镜像站由清华大学 TUNA 协会负责运行维护。{% endcapture %}
{% capture page_title %}{% if page.mirrorid %} {{ page.mirrorid }} |{% elsif page.title %} {{ page.title }} |{% endif %}{% if include.cattitle %} {{ include.cattitle }} |{% endif %}{% if (page.title or include.cattitle) %}{{" "}}{% endif %}{{ site.title }}{% if site.brand %} | {{ site.brand }}{% endif %}{% endcapture %}
<meta name="description" content="{{ page_desc }}">
<meta name="keywords" content="镜像站,镜像源,Linux,软件源,开源">
<meta name="author" content="{{ site.author }}">
<link rel="shortcut icon" href="/static/img/favicon.png">
<!-- Open Graph metadata -->
<meta property="og:title" content="{{ page_title }}" />
<meta property="og:description" content="{{ page_desc }}" />
<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/static/img/logo-share.png" /> <!-- WeChat requires that thumbnail image is larger than 300x300 -->
<meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
<meta property="og:locale" content="zh_CN" />
{% if include.notArticle %}
<meta property="og:type" content="website" />
{% else %}
<meta property="og:type" content="article" />
{% if page.date %}
<meta property="article:published_time" content="{{page.date | date_to_xmlschema}}"/>
{% endif %}
<meta property="article:author" content="{{ site.author }}"/>
{% endif %}
<title>{{ page_title }}</title>
{% unless include.nostyle %}
<link rel="stylesheet" href="/static/css/bootstrap.min.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="/static/css/bootstrap-select.min.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="/static/css/style.css?{{ site.data['hash'] }}">
<script src="/static/js/jquery.min.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/bootstrap.min.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/bootstrap-select.min.js?{{ site.data['hash'] }}"></script>
{% unless page.legacy %}
<script src="/static/js/vue.min.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/timeago.min.js?{{ site.data['hash'] }}"></script>
{% endunless %}
<script src="/static/js/markup.min.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/webfont.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/thuhidden.js?{{ site.data['hash'] }}"></script>
{% if page.legacy %}
<style>
.container {
width: 85%;
}
.container > .navbar-header {
margin-right: 0;
margin-left: 0;
}
.navbar-nav {
float: left;
margin: 0;
}
.navbar-nav > li {
float: left;
}
.navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
}
.navbar-nav.navbar-right:last-child {
margin-right: -15px;
}
.navbar-left {
float: left !important;
}
.navbar-right {
float: right !important;
}
.navbar-header:after {
clear: none;
}
a.navbar-brand {
width: 20em;
}
<!--[if lte IE 7]>
.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,
.col-xs-10,.col-xs-11,.col-xs-12 {
padding: 0px;
}
<![endif]-->
</style>
{% endif %}
{% endunless %}
</head>