diff options
| author | Ahmed Alaa <aa@4b.cx> | 2023-04-05 19:14:29 +0000 |
|---|---|---|
| committer | Ahmed Alaa <aa@4b.cx> | 2023-04-05 19:14:29 +0000 |
| commit | 6496bae0a3acf9a2eded5f02269fde8d0821aac2 (patch) | |
| tree | ad64e9f4fa24385a2ed7ae417ed6aa0bd9ee5d43 | |
| parent | e094ecaf35c733f74ce777a91a672adca6003eaf (diff) | |
| parent | 201e9051544cf8c8e8ad22845a79c19cd171ebe8 (diff) | |
Merge branch 'no-twitter' into 'no-twitter'
templates/base: allow excluding twitter stuff from page source
See merge request 4bcx/no-style-please!3
| -rw-r--r-- | config.toml | 1 | ||||
| -rw-r--r-- | templates/base.html | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/config.toml b/config.toml index c112134..0800857 100644 --- a/config.toml +++ b/config.toml @@ -17,6 +17,7 @@ highlight_code = true [extra] author = "Ahmed Alaa" logo = "images/logo.png" +twitter = true header_nav = [ { name = "~home", url = "/" }, { name = "#tags", url = "/tags" }, diff --git a/templates/base.html b/templates/base.html index 713307c..8c737df 100644 --- a/templates/base.html +++ b/templates/base.html @@ -60,11 +60,13 @@ {% if description %}<meta property="og:description" content="{{ description }}">{% endif %} {% if image %}<meta property="og:image" content="{{ image }}">{% endif %} + {% if config.extra.twitter %} <meta property="twitter:card" content="summary_large_image"> <meta property="twitter:url" content="{{ url | safe }}"> {% if title %}<meta property="twitter:title" content="{{ title }}">{% endif %} {% if description %}<meta property="twitter:description" content="{{ description }}">{% endif %} {% if image %}<meta property="twitter:image" content="{{ image }}">{% endif %} + {% endif %} <link rel="canonical" href="{{ url | safe }}"> {% if image %}<link rel="shortcut icon" type="image/x-icon" href="{{ get_url(path=config.extra.logo, trailing_slash=false) }}">{% endif %} |
