templates for self-hosting game jams (or any other kind of jam tbh)
at main 3.3 kB view raw
1<head> 2 <meta charset="UTF-8"> 3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 {% if page.meta %} 7 <!-- the meta data config goes here --> 8 {% assign page_has_og_title = false -%} 9 {% assign page_has_og_description = false -%} 10 {% assign page_has_description = false -%} 11 {% for data in page.meta %} 12 <meta 13 {% for item in data %} 14 {% if item[0] == "property" and item[1] == "og:title"%} 15 {% assign page_has_og_title = true -%} 16 {% endif %} 17 {% if item[0] == "property" and item[1] == "og:description"%} 18 {% assign page_has_og_description = true -%} 19 {% endif %} 20 {% if item[0] == "name" and item[1] == "description"%} 21 {% assign page_has_description = true -%} 22 {% endif %} 23 {{ key }}="{{ value }}" 24 {% endfor %} 25 /> 26 {% endfor %} 27 {% endif %} 28 29 {% if current_path == "/" %} 30 <title> 31 {{ site.title }} 32 </title> 33 {% if not page_has_og_title %} 34 <meta property="og:title" content="{{ site.title }}" /> 35 {% endif %} 36 {% else %} 37 <title> 38 {{ site.title }} > {% if page.title %} {{ page.title | lower }} 39 {% elsif section.title %} {{ section.title | lower }} 40 {% else %} post {% endif %} 41 </title> 42 43 {% if !page_has_og_title %} 44 <meta property="og:title" content="{% if page.title -%}{{ page.title | lower }}{% elsif section.title %}{{ section.title | lower }}{% elsif site.title -%}{{ site.title | lower }}{% else -%}post{% endif -%}" /> 45 {% endif %} 46 {% endif %} 47 48 {% if !page_has_og_description %} 49 {% if page.description %} 50 <meta property="og:description" content="{{ page.description }}" /> 51 {% elsif section.description %} 52 <meta property="og:description" content="{{ section.description }}" /> 53 {% elsif site.description %} 54 <meta property="og:description" content="{{ site.description }}" /> 55 {% endif %} 56 {% endif %} 57 58 {% if !page_has_description %} 59 {% if page.description %} 60 <meta name="description" content="{{ page.description }}" /> 61 {% elsif section.description %} 62 <meta name="description" content="{{ section.description }}" /> 63 {% elsif site.description %} 64 <meta name="description" content="{{ site.description }}" /> 65 {% endif %} 66 {% endif %} 67 68 {% if site.favicon %} 69 <link rel="icon" type="image/png" sizes="16x16" href="{{ site.favicon }}" /> 70 {% endif %} 71 72 {% if site.favicon32 %} 73 <link rel="icon" type="image/png" sizes="32x32" href="{{ site.favicon32 }}" /> 74 {% endif %} 75 76 {% if site.appletouch %} 77 <link rel="apple-touch-icon" sizes="180x180" href="{{ site.appletouch }}" /> 78 {% endif %} 79 80 {% if site.webmanifest %} 81 <link rel="manifest" href="{{ baseurl }}/site.webmanifest"> 82 {% endif %} 83 84 <link rel="stylesheet" type="text/css" media="screen" href="{{ baseurl }}/style.css" /> 85</head>