-
-
Notifications
You must be signed in to change notification settings - Fork 725
Expand file tree
/
Copy pathbase.njk
More file actions
180 lines (161 loc) · 6.94 KB
/
Copy pathbase.njk
File metadata and controls
180 lines (161 loc) · 6.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---js
// <script>
let headerTitle = "Eleventy";
let scriptImportMap = {
"@sindresorhus/slugify": "https://cdn.jsdelivr.net/npm/@sindresorhus/slugify@2.2.1/+esm"
};
// For things that rely on the data cascade
let eleventyComputed = {
title: function(data) {
return data.titleOverride || data.newstitle || data.searchTitle || data.tiptitle || data.eleventyNavigation?.key || data.title || data.headerTitle;
},
social: {
description: function({ versions, config }) {
return `A docs page for Eleventy, a simpler static site generator.`;
}
}
};
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%- set subtitleText %}{{ title }}{% if title and title != "Eleventy is a simpler static site generator" %} — Eleventy{% endif %}{% endset %}
<title>{{ subtitleText }}</title>
<meta name="description" content="{{ subtitleText }}">
<meta name="generator" content="{{ eleventy.generator }}">
{%- if page.url != "/" %}
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f2f2f2">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2a2a">
{%- else %}
<meta name="theme-color" content="#1f1f1f">
{%- endif %}
{%- if scriptImportMap %}
<script type="importmap">
{
"imports": {
{%- for key, url in scriptImportMap %}
"{{ key }}": "{{ url }}"{% if not loop.last %},{% endif %}
{%- endfor %}
}
}
</script>
{%- endif %}
<link rel="preload" href="/css/fonts/benchnine-bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="icon" type="image/png" sizes="96x96" href="/img/favicon.png">
<link rel="me" href="https://fosstodon.org/@eleventy">
<link rel="me" href="https://neighborhood.11ty.dev/@11ty">
<meta name="fediverse:creator" content="@11ty@neighborhood.11ty.dev">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:url" content="{{ page.url | productionUrl }}">
<meta property="og:site_name" content="Eleventy">
<meta property="og:locale" content="en_US">
<meta property="og:title" content="{{ title }}">
<meta property="og:description" content="{{ social.description }}">
{%- if ogimageOverride.src %}
<meta property="og:image" content="{{ ogimageOverride.src | productionUrl }}">
<meta property="og:image:type" content="{{ ogimageOverride.type or 'image/png' }}">
<meta property="og:image:alt" content="{{ ogimageOverride.alt | throwErrorWhenMissing('Missing alt image on opengraph image') }}">
{%- elseif eleventy.env.runMode == "serve" or page.url == "/" or page.inputPath.endsWith("author-pages.md") %}
<meta property="og:image" content="{{ '/img/open-graph.jpg' | productionUrl }}">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:alt" content="The 11ty logo (with a small floating possum hiding in the letter y)">
{%- else %}
<meta property="og:image" content="{{ page | getOpengraphImageUrl(screenshotCacheBust) }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:alt" content="A screenshot of the web page at {{ config.origin }}{{ page.url }}">
{%- endif %}
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<!-- Feeds -->
<link rel="alternate" href="/blog/feed.xml" title="Eleventy Blog" type="application/atom+xml">
<link rel="alternate" href="/firehose/firehose.rss" title="Eleventy Firehose" type="application/rss+xml">
{%- if feedTitle and feedUrl %}
<link rel="alternate" href="{{ feedUrl }}" title="{{ feedTitle }}" type="application/atom+xml">
{%- endif %}
<link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Eleventy">
{%- set css %}
{% include 'components/announcement.css' %}
{% include "components/fonts.css" %}
{% include 'index.css' %}
{% include 'components/header.css' %}
{% include 'components/navigation.css' %}
{% include 'components/toc.css' %}
{% include 'components/direct-links.css' %}
{% include 'components/callout.css' %}
{% include 'components/grid-layout.css' %}
{% include 'components/seven-minute-tabs.css' %}
{% include 'components/supporters.css' %}
{% if page.url != '/' %}
{# these components are not yet used on WebC pages #}
{% include 'components/breadcrumb.css' %}
{# these components have been converted to WebC #}
{% include 'components/prism-theme.css' %}
{% include 'components/code.css' %}
{% include 'components/code-copy.css' %}
{% include 'components/code-more.css' %}
{% include 'components/inline-code.css' %}
{% include 'components/layout.css' %}
{# TODO reference these directly from node_modules at some point #}
{% include 'components/flex-luthor/flex-luthor.css' %}
{% include 'components/flex-luthor/flex-luthor-separators.css' %}
{% include 'components/testimonials.css' %}
{% include 'components/possum.css' %}
{% include 'components/possum-home.css' %}
/* Filters */
.filter-tags--hide {
display: none;
}
.select-filter {
font-size: 16px;
padding: .3em .5em;
}
{% endif %}
{% endset %}
<style>
{{ css | cssmin | safe }}
{% getBundle "css" %}
</style>
{%- if page.url == '/' %}
<link rel="stylesheet" href="{% getBundleFileUrl 'css', 'async' %}" media="print" onload="this.media='all'" fetchpriority="low">
<noscript>
<link rel="stylesheet" href="{% getBundleFileUrl 'css', 'async' %}" fetchpriority="low">
</noscript>
{%- elseif config.env === "production" %}
<link rel="stylesheet" href="/css/async.css" media="print" onload="this.media='all'" fetchpriority="low">
<noscript>
<link rel="stylesheet" href="/css/async.css" fetchpriority="low">
</noscript>
{%- else %}
<link rel="stylesheet" href="/css/async.css" fetchpriority="low">
{%- endif %}
<script type="module">
{% include "../components/details-force-state.js" %}
{% include "../components/disabled-form.js" %}
</script>
{%- if page.url == '/' %}
{# see also "eleventy-js.njk" #}
{% js %}{% include "../../../node_modules/@11ty/is-land/is-land.js" %}{% endjs %}
{% js "async" %}{% include "components/active-background.js" %}{% endjs %}
{% js "async" %}{% include "../../../node_modules/@zachleat/heading-anchors/heading-anchors.js" %}{% endjs %}
{% js "async" %}{% include "../../../node_modules/@zachleat/details-utils/details-utils.js" %}{% endjs %}
{% js "async" %}{% include "../../../node_modules/@zachleat/seven-minute-tabs/seven-minute-tabs.js" %}{% endjs %}
{% js "async" %}{% include "components/eleventy-shell-syntax.js" %}{% endjs %}
<script type="module" src="{% getBundleFileUrl 'js' %}"></script>
<script type="module" src="{% getBundleFileUrl 'js', 'async' %}"></script>
{%- else %}
<script src="/js/eleventy.js" type="module"></script>
{%- endif %}
<!-- Web Awesome Kit -->
<script src="https://kit.webawesome.com/a2ff939369d44af1.js" crossorigin="anonymous"></script>
</head>
<body>
{{ content | safe }}
<!-- Built on {{ config.now | newsDate }} by Eleventy -->
<div>
{% getBundle "fontawesome" %}
</div>
</body>
</html>