|
| 1 | +--- |
| 2 | +layout: main |
| 3 | +--- |
| 4 | +<link rel=" stylesheet" href=" https://cdn.jsdelivr.net/npm/[email protected]/themes/satellite-min.css" integrity=" sha256-TehzF/2QvNKhGQrrNpoOb2Ck4iGZ1J/DI4pkd2oUsBc=" crossorigin=" anonymous" > |
| 5 | + |
| 6 | +<main class="docs__body stage__body"> |
| 7 | + <div class="docs__navbar"> |
| 8 | + <div class="flex flex--justify gutter gutter--large@medium"> |
| 9 | + <div class="flex__column flex__column--6@xlarge"> |
| 10 | + <div class="search"> |
| 11 | + <div class="field field--expand field--icon"> |
| 12 | + <div id="autocomplete"></div> |
| 13 | + {% unless include.mobile %} |
| 14 | + <div class="field__icon field__icon--right flex flex--middle flex--center"> |
| 15 | + <button class="field__button" data-ref="search-navbar[trigger]"> |
| 16 | + {% include icons/symbols/cross.svg %} |
| 17 | + </button> |
| 18 | + </div> |
| 19 | + {% endunless %} |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div class="flex__column flex__column--shrink"> |
| 25 | + {% include_cached navbar/nav.html %} |
| 26 | + </div> |
| 27 | + </div> |
| 28 | + </div> |
| 29 | + |
| 30 | + {% include_cached navbar/navbar-mobile.html %} |
| 31 | + |
| 32 | + <article class="page" data-tracking-scroll data-swiftype-name="body" data-swiftype-type="text"> |
| 33 | + <div class="page__body"> |
| 34 | + {% include components/breadcrumbs.html %} |
| 35 | + |
| 36 | + {%- if page.title -%} |
| 37 | + <h1 id="{{ page.title | slugify }}"> |
| 38 | + {{ page.title }} |
| 39 | + </h1> |
| 40 | + {%- endif -%} |
| 41 | + |
| 42 | + {%- if page.beta -%} |
| 43 | + {% include content/beta.md %} |
| 44 | + {%- endif -%} |
| 45 | + |
| 46 | + {%- unless page.hide_toc -%} |
| 47 | + {% include sidebar/mobile-menu-side.html %} |
| 48 | + {%- endunless -%} |
| 49 | + |
| 50 | + <div class="markdown" data-headings-anchors> |
| 51 | + {{ content }} |
| 52 | + </div> |
| 53 | + |
| 54 | + <p class="last-modified">This page was last modified: {{ page.last_modified_at | date: '%d %b %Y' }}</p> |
| 55 | + |
| 56 | + {% if page.contributors %} |
| 57 | + {% include components/recent-contributor.html contributors=page.contributors %} |
| 58 | + {% endif %} |
| 59 | + |
| 60 | + {% if page.related %} |
| 61 | + <hr> |
| 62 | + {% include components/related.html items=page.related %} |
| 63 | + {% endif %} |
| 64 | + |
| 65 | + {% unless page.hide-feedback %} |
| 66 | + <hr> |
| 67 | + {% include components/feedback.html %} |
| 68 | + {% endunless %} |
| 69 | + |
| 70 | + <hr> |
| 71 | + |
| 72 | + {% include components/callout.html %} |
| 73 | + </div> |
| 74 | + |
| 75 | + {%- unless page.hide-sidebar -%} |
| 76 | + <div class="docs__sidebar page__sidebar"> |
| 77 | + <div class="sidebar sidebar--sticky sidebar--scroll"> |
| 78 | + {%- unless page.hide_toc -%} |
| 79 | + <div data-anchors-indicator data-sections="h2" data-active-class="menu-side__link--active"> |
| 80 | + {% include_cached sidebar/menu-side.html class="menu-side" anchor_class="menu-side__link" html=content h_min=2 h_max=2 %} |
| 81 | + </div> |
| 82 | + {% endunless %} |
| 83 | + |
| 84 | + {% if page.related %} |
| 85 | + {% include sidebar/related-content.html items=page.related %} |
| 86 | + {% endif %} |
| 87 | + |
| 88 | + {% unless page.hide-feedback %} |
| 89 | + {% include_cached sidebar/feedback.html %} |
| 90 | + {% endunless %} |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + {% endunless %} |
| 94 | + </article> |
| 95 | +</main> |
| 96 | +<script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch-lite.umd.js" integrity=" sha256-EXPXz4W6pQgfYY3yTpnDa3OH8/EPn16ciVsPQ/ypsjk=" crossorigin=" anonymous" ></script> |
| 97 | +<script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js" integrity=" sha256-LAGhRRdtVoD6RLo2qDQsU2mp+XVSciKRC8XPOBWmofM=" crossorigin=" anonymous" ></script> |
| 98 | + |
| 99 | +<script> |
| 100 | +const appId = 'UINQ2M4D9S'; |
| 101 | +const apiKey = '636b6d9e2dfb207e89ea7344859848f9'; |
| 102 | +const searchClient = algoliasearch(appId, apiKey); |
| 103 | + |
| 104 | +const instantSearch = instantsearch({ |
| 105 | + indexName: 'segment-docs', |
| 106 | + searchClient, |
| 107 | + routing: true, |
| 108 | + facetFilters: ['hidden:-true'], |
| 109 | + |
| 110 | +}); |
| 111 | + |
| 112 | +instantSearch.addWidgets([ |
| 113 | + instantsearch.widgets.searchBox({ |
| 114 | + container: '#searchbox', |
| 115 | + }), |
| 116 | + |
| 117 | + instantsearch.widgets.configure({ |
| 118 | + hitsPerPage: 7, |
| 119 | + facetFilters: ['hidden:-true'], |
| 120 | + }), |
| 121 | + |
| 122 | + instantsearch.widgets.hits({ |
| 123 | + container: '#hits', |
| 124 | + templates: { |
| 125 | + item(item){ |
| 126 | + if (item.anchor != null) { |
| 127 | + var anchorLink = "#" + item.anchor; |
| 128 | + } else { |
| 129 | + var anchorLink = ""; |
| 130 | + } |
| 131 | + return `<a class="aa-link" href="/docs${item.url}${anchorLink}"> |
| 132 | + <p class="aa-title" >${item.title}</h3> |
| 133 | + <p class="aa-heading">${item.headings.join(' >')}</p> |
| 134 | + <p class="aa-content">${item.content}</p></a> |
| 135 | + `; |
| 136 | + } |
| 137 | + } |
| 138 | + }) |
| 139 | +]); |
| 140 | + |
| 141 | +instantSearch.start(); |
| 142 | + |
| 143 | +</script> |
0 commit comments