{% extends "base.html" %}

{% block announce %}
📌《Flask Web 开发实战》第 2 版正在写作中，预计 2024 年初上市。写作进度见<a href="https://helloflask.com/book/4" target="_blank" style="color: #526cfe">本书主页</a>。欢迎关注 <a href="https://twitter.com/greylihui" target="_blank" style="color: #526cfe">Twitter</a> 或<a href="https://greyli.com/files/qrcode_gh.jpg" target="_blank" style="color: #526cfe">微信公众号</a>获取最新动态。
{% endblock %}

{% block extrahead %}
{% set title = config.site_name %}
{% if page and page.title and not page.is_homepage %}
  {% set title = config.site_name ~ " - " ~ page.title | striptags %}
{% endif %}
{% set image = config.site_url ~ '_assets/banner.png' %}
{% set fav_image = config.site_url ~ '_assets/favicon.png' %}
<!-- Open graph meta tags -->
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ config.site_description }}" />
<meta property="og:url" content="{{ page.canonical_url }}" />
<meta property="og:image" content="{{ image }}" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1280" />·
<meta property="og:image:height" content="640" />
<!-- Twitter meta tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@helloflask" />
<meta name="twitter:creator" content="@helloflask" />
<meta name="twitter:title" content="{{ title }}" />
<meta name="twitter:description" content="{{ config.site_description }}" />
<meta name="twitter:image" content="{{ fav_image }}" />
{% endblock %}

{% block analytics %}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q5PZT7R39D"></script>
<script>
if (window.location.hostname != "localhost") {
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-Q5PZT7R39D');
}
</script>
{% endblock %}
