|
| 1 | +{# --- SET VARIABLES --- #} |
| 2 | +{% set description = (page.meta.description if page and page.meta else none) or config.site_description %} |
| 3 | +{% set title = (page.title if page and page.title else none) or config.site_name %} |
| 4 | +{% set raw_keywords = page.meta.keywords if page and page.meta and page.meta.keywords else config.extra.keywords %} |
| 5 | +{% if raw_keywords is iterable and raw_keywords is not string %} |
| 6 | + {% set keywords = raw_keywords | join(', ') %} |
| 7 | +{% else %} |
| 8 | + {% set keywords = raw_keywords %} |
| 9 | +{% endif %} |
| 10 | + |
| 11 | +<meta name="google-site-verification" content="{{ config.extra.google_site_verification }}" /> |
| 12 | +<meta name="description" content="{{ description }}"> |
| 13 | +{% if keywords %} |
| 14 | + <meta name="keywords" content="{{ keywords }}"> |
| 15 | +{% endif %} |
| 16 | + |
| 17 | +{# Open Graph Meta Tags #} |
| 18 | +<meta property="og:type" content="website"> |
| 19 | +<meta property="og:url" content="{{ config.site_url }}/"> |
| 20 | +<meta property="og:title" content="{{ title }}"> |
| 21 | +<meta property="og:description" content="{{ description }}"> |
| 22 | +<meta property="og:image" content="{{ config.extra.og_image }}"> |
| 23 | + |
| 24 | +{# Twitter Card Meta Tags #} |
| 25 | +<meta property="twitter:card" content="summary_large_image"> |
| 26 | +<meta property="twitter:url" content="{{ config.site_url }}/"> |
| 27 | +<meta property="twitter:title" content="{{ title }}"> |
| 28 | +<meta property="twitter:description" content="{{ description }}"> |
| 29 | +<meta property="twitter:image" content="{{ config.extra.og_image }}"> |
| 30 | + |
| 31 | +{# Robots Meta Tag #} |
| 32 | +<meta name="robots" content="index, follow"> |
| 33 | + |
| 34 | +{# Structured Data (JSON-LD) #} |
| 35 | +<script type="application/ld+json"> |
| 36 | +{ |
| 37 | + "@context": "https://schema.org", |
| 38 | + "@type": "SoftwareApplication", |
| 39 | + "name": "{{ title }}", |
| 40 | + "description": "{{ description }}", |
| 41 | + "applicationCategory": "DeveloperApplication", |
| 42 | + "operatingSystem": "Cross-platform", |
| 43 | + "author": { |
| 44 | + "@type": "Person", |
| 45 | + "name": "{{ config.site_author }}" |
| 46 | + }, |
| 47 | + "programmingLanguage": "Python", |
| 48 | + "url": "{{ config.site_url }}", |
| 49 | + "codeRepository": "{{ config.repo_url }}" |
| 50 | +} |
| 51 | +</script> |
| 52 | + |
0 commit comments