Skip to content

Commit

Permalink
docs: add search to docsite using gcse
Browse files Browse the repository at this point in the history
  • Loading branch information
mattem authored and alexeagle committed Aug 27, 2020
1 parent 2d7ed6d commit 1ed754e
Show file tree
Hide file tree
Showing 24 changed files with 357 additions and 35 deletions.
1 change: 1 addition & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ rules_nodejs_docs(
config = "_config.yml",
css = "//docs/css",
docs = [
"search.md",
"install.md",
"repositories.md",
"debugging.md",
Expand Down
12 changes: 10 additions & 2 deletions docs/Built-ins.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -2789,7 +2797,7 @@ <h2 id="node_modules_aspect">node_modules_aspect</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Cypress.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -333,7 +341,7 @@ <h2 id="cypress_repository">cypress_repository</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Jasmine.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -317,7 +325,7 @@ <h2 id="jasmine_node_test">jasmine_node_test</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Karma.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -455,7 +463,7 @@ <h2 id="karma_web_test_suite">karma_web_test_suite</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Protractor.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -385,7 +393,7 @@ <h2 id="protractor_web_test_suite">protractor_web_test_suite</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Rollup.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -529,7 +537,7 @@ <h2 id="rollup_bundle">rollup_bundle</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/Terser.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -360,7 +368,7 @@ <h2 id="terser_minified">terser_minified</h2>
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions docs/TypeScript.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="/rules_nodejs/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand All @@ -63,7 +69,7 @@

<div class="container vpad">
<div class="row">
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down Expand Up @@ -134,6 +140,8 @@ <h3>Rules</h3>





</ul>

<h3>Community</h3>
Expand Down Expand Up @@ -1424,7 +1432,7 @@ <h3 id="issues-when-running-non-sandboxed">Issues when running non-sandboxed</h3
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; 2020 Google</p>
<p class="text-muted">&copy; 2020 The rules_nodejs authors</p>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/footer-content.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container">
<div class="row">
<div class="col-lg-8">
<p class="text-muted">&copy; {{ 'now' | date: "%Y" }} Google</p>
<p class="text-muted">&copy; {{ 'now' | date: "%Y" }} The rules_nodejs authors</p>
</div>
</div>
</div>
6 changes: 6 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-right" action="{{ "/search.html" | relative_url }}" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="2735dc72dd157bd19">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/bazelbuild/rules_nodejs">GitHub</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/sidenav.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="col-md-2 sticky-sidebar">
<div class="col-md-2">
<a aria-controls="sidebar-nav"
aria-expanded="false" class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse"
href="#sidebar-nav">
Expand Down
21 changes: 21 additions & 0 deletions docs/_layouts/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html itemscope itemtype="https://schema.org/WebPage" lang="en">
{% include head.html %}
<body>
{% include header.html %}

<div class="container vpad">
{{ content }}
<div class="gcse-searchresults-only"></div>
</div>

{% include footer.html %}
<script>
const params = new URLSearchParams(window.location.search);
document.getElementById('q').value = params.get('q');
</script>
<script async src="https://cse.google.com/cse.js?cx=2735dc72dd157bd19"></script>

</body>
</html>

Loading

0 comments on commit 1ed754e

Please sign in to comment.