Skip to content

Commit 60b49fd

Browse files
Sylvain PacejasonLaster
Sylvain Pace
authored andcommitted
Adding DocSearch to the site (firefox-devtools#6022)
1 parent 61353ea commit 60b49fd

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

_layouts/default.html

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: "en-US" }}">
3+
<head>
4+
<meta charset="UTF-8">
5+
<!-- Cusom html from the cayman theme, used in order to include DocSearch cf https://help.github.com/articles/customizing-css-and-html-in-your-jekyll-theme/-->
6+
{% seo %}
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<meta name="theme-color" content="#157878">
9+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
11+
<style>
12+
.algolia-autocomplete, .ds-dropdown-menu {
13+
min-width: 100% !important;
14+
}
15+
#q {
16+
margin: 1em auto;
17+
width: 100%;
18+
height: 1.5em;
19+
}
20+
.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu {
21+
left: 0 !important;
22+
min-width: 99%
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<section class="page-header">
28+
<h1 class="project-name">{{ site.title | default: site.github.repository_name }}</h1>
29+
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
30+
{% if site.github.is_project_page %}
31+
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
32+
{% endif %}
33+
{% if site.show_downloads %}
34+
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
35+
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
36+
{% endif %}
37+
</section>
38+
39+
<section class="main-content">
40+
<input type="search" id='q' placeholder="Search debugger.html ...">
41+
</section>
42+
<section class="main-content">
43+
{{ content }}
44+
45+
<footer class="site-footer">
46+
{% if site.github.is_project_page %}
47+
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
48+
{% endif %}
49+
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
50+
</footer>
51+
</section>
52+
53+
{% if site.google_analytics %}
54+
<script>
55+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
56+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
57+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
58+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
59+
60+
ga('create', '{{ site.google_analytics }}', 'auto');
61+
ga('send', 'pageview');
62+
</script>
63+
{% endif %}
64+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
65+
<script type="text/javascript"> docsearch({
66+
apiKey: 'a6b8766ba29d14a94923259734c3b342',
67+
indexName: 'firefox_debugger_html',
68+
inputSelector: '#q',
69+
debug: false // Set debug to true if you want to inspect the dropdown
70+
});
71+
</script>
72+
</body>
73+
</html>

0 commit comments

Comments
 (0)