-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
54 lines (53 loc) · 2.67 KB
/
Copy pathdocs.html
File metadata and controls
54 lines (53 loc) · 2.67 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
---
layout: base.html
---
<div class="container" style="padding-top:56px;padding-bottom:64px;">
<div class="doc-layout">
<aside class="doc-toc">
<div class="doc-toc-title">On this page</div>
{%- comment -%}
A page may pin ONE off-page link to the top of its contents menu. /api/ pins
the FAQ, because a reader in the reference is usually chasing a "how do
I…" question and the answer to that shape of question is a different page —
leaving it findable only in the prose put it below the fold.
The pin is styled as leaving the page (accent, arrow, rule beneath) so it is
not mistaken for a section of this one, and site.js counts it when deciding
whether the sidebar has anything to show — a page that pinned a link but has
no [[toc]] would otherwise hide the pin along with the empty menu.
{%- endcomment -%}
{%- if tocPin %}
<a class="doc-toc-pin" href="{{ tocPin.url }}">{{ tocPin.label }} <span aria-hidden="true">→</span></a>
{%- endif %}
<div data-toc-slot></div>
</aside>
<div class="doc-main">
{% if docLabel or title %}
{% include "breadcrumbs.html" %}
<header style="margin-bottom:30px;">
{% if docLabel %}<div class="section-label" style="margin-bottom:14px;">// {{ docLabel }}</div>{% endif %}
{%- comment -%}
`heading` overrides the visible H1 while `title` stays the search-engine
title, the same split `crumbLeaf` makes for the breadcrumb: a title that
earns the click ("FAQ: how to do the common things with @imqueue") is not
what a reader who has already arrived wants to read at the top of the page.
{%- endcomment -%}
{% if title %}<h1 style="font-family:var(--font-display);font-size:40px;line-height:1.1;letter-spacing:-.03em;margin:0 0 12px;">{{ heading | default: title }}</h1>{% endif %}
{% if lead %}<p class="muted" style="font-size:17px;line-height:1.65;max-width:680px;margin:0;">{{ lead }}</p>{% endif %}
</header>
{% endif %}
<article class="prose">
{%- comment -%}
A page that declares itself an FAQ gets its question headings wrapped into
an accordion — see the faqAccordion filter in eleventy.config.js for why
that happens here, on rendered HTML, rather than in the markdown source.
{%- endcomment -%}
{% if faqPage %}{{ content | faqAccordion }}{% else %}{{ content }}{% endif %}
</article>
{% include "doc-updated.html" %}
{% include "mirror-link.html" %}
{% include "faq-jsonld.html" %}
{% include "glossary-jsonld.html" %}
{% include "related-reading.html" %}
</div>
</div>
</div>