mirror of
https://github.com/kogakure/website-11ty-kogakure.de.git
synced 2026-02-03 20:25:30 +00:00
chore: initial setup
This commit is contained in:
4
src/includes/favicons.njk
Normal file
4
src/includes/favicons.njk
Normal file
@@ -0,0 +1,4 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="icon" href="{{ site.faviconPath }}favicon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="{{ site.faviconPath }}apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
3
src/includes/icon-sprites.njk
Normal file
3
src/includes/icon-sprites.njk
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="0" height="0">
|
||||
{# {% include "icons.svg" %} #}
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 123 B |
45
src/includes/meta-tags.njk
Normal file
45
src/includes/meta-tags.njk
Normal file
@@ -0,0 +1,45 @@
|
||||
{%- set ogTitle -%}
|
||||
{%- if page.url === "/" -%}
|
||||
{{ site.author }} · {{ site.description }}
|
||||
{%- else -%}
|
||||
{{ title }} · {{ site.author }}
|
||||
{%- endif -%}
|
||||
{%- endset -%}
|
||||
|
||||
{%- set ogDescription -%}
|
||||
{%- if page.url === "/" -%}
|
||||
{{ site.tagline }}
|
||||
{%- else -%}
|
||||
{{ description or title }}
|
||||
{%- endif -%}
|
||||
{%- endset -%}
|
||||
|
||||
{%- set ogImage -%}
|
||||
{%- if og -%}
|
||||
{{ site.url }}/assets/images/branding/og/{{ og }}
|
||||
{%- else -%}
|
||||
{{ site.url }}/assets/images/branding/og/banner.png
|
||||
{%- endif -%}
|
||||
{%- endset -%}
|
||||
|
||||
<!-- Meta -->
|
||||
<meta name="author" content="{{ site.author }}" />
|
||||
<meta name="description" content="{{ ogDescription }}" />
|
||||
<meta name="theme-color" content="#e7e6e4" />
|
||||
|
||||
<!-- Open graph -->
|
||||
<meta property="og:title" content="{{ ogTitle }}" />
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
||||
<meta property="og:description" content="{{ ogDescription }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:image" content="{{ ogImage }}"/>
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="675" />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:title" content="{{ ogTitle }}" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="{{ site.twitter }}" />
|
||||
<meta name="twitter:description" content="{{ ogDescription }}" />
|
||||
<meta name="twitter:image" content="{{ ogImage }}" />
|
||||
<meta name="twitter:creator" content="{{ site.twitter }}" />
|
||||
2
src/includes/preload.njk
Normal file
2
src/includes/preload.njk
Normal file
@@ -0,0 +1,2 @@
|
||||
<link rel="preload" href="{{ '/assets/fonts/xyz1.woff2' | url }}" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="{{ '/assets/fonts/xyz2.woff2' | url }}" as="font" type="font/woff2" crossorigin />
|
||||
5
src/includes/robots.njk
Normal file
5
src/includes/robots.njk
Normal file
@@ -0,0 +1,5 @@
|
||||
{% if robots %}
|
||||
<meta name="robots" content="{{ robots }}" />
|
||||
{% else %}
|
||||
<meta name="robots" content="all" />
|
||||
{% endif %}
|
||||
7
src/includes/scripts.njk
Normal file
7
src/includes/scripts.njk
Normal file
@@ -0,0 +1,7 @@
|
||||
{% set js %}
|
||||
{% include "../assets/scripts/embedded/theme-switcher.js" %}
|
||||
{% if site.isProduction %}
|
||||
{% include "../assets/scripts/embedded/register-serviceworker.js" %}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
<script>{{ js | jsmin | safe }}</script>
|
||||
28
src/includes/styles.njk
Normal file
28
src/includes/styles.njk
Normal file
@@ -0,0 +1,28 @@
|
||||
{% if site.isProduction %}
|
||||
{% set criticalCSS %}
|
||||
{% include "critical/base.css" %}
|
||||
{% if css %}
|
||||
{% include "critical/" + css %}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
<style>
|
||||
{{ criticalCSS | safe }}
|
||||
</style>
|
||||
|
||||
{% else %}
|
||||
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/base.css' | url }}" />
|
||||
{% if css %}
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/' + css | url }}" />
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/main.css' | url }}" media="print" onload="this.media='all'" />
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/print.css' | url }}" media="print" />
|
||||
|
||||
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/main.css' | url }}" />
|
||||
</noscript>
|
||||
Reference in New Issue
Block a user