Skip to content

Commit e527bbf

Browse files
ashtumalandefreitas
authored andcommitted
Add Antora Lunr Extension
1 parent 2fb4c6e commit e527bbf

File tree

5 files changed

+218
-4
lines changed

5 files changed

+218
-4
lines changed

antora-ui/src/partials/header-content.hbs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
<a class="navbar-item" href="{{{or site.url siteRootPath}}}">{{site.title}}</a>
55
{{#if env.SITE_SEARCH_PROVIDER}}
66
<div class="navbar-item search hide-for-print">
7-
<div id="search-field" class="field">
8-
<input id="search-input" type="text" placeholder="Search the docs"{{#if page.home}} autofocus{{/if}}>
7+
<div id="search-field" class="field has-filter">
8+
<input id="search-input" type="text" placeholder="Search the docs" {{#if page.home}} autofocus{{/if}}>
9+
<label class="filter checkbox">
10+
<input type="checkbox" data-facet-filter="component:{{page.component.name}}"> Only in
11+
{{page.component.name}}
12+
</label>
913
</div>
1014
</div>
1115
{{/if}}
@@ -38,7 +42,8 @@
3842
-->
3943
<div class="navbar-item">
4044
<span class="control">
41-
<a class="button is-primary" target="blank_" href="https://github.com/cppalliance/site-docs/issues/new/choose">Report an Issue</a>
45+
<a class="button is-primary" target="blank_"
46+
href="https://github.com/cppalliance/site-docs/issues/new/choose">Report an Issue</a>
4247
</span>
4348
</div>
4449
</div>

libs.playbook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ site:
3939
antora:
4040
extensions:
4141
- require: ./boost.js
42+
- require: '@antora/lunr-extension'
4243

4344
content:
4445
sources:

package-lock.json

Lines changed: 205 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
"devDependencies": {
33
"@antora/cli": "3.1.2",
44
"@antora/site-generator": "3.1.2"
5+
},
6+
"dependencies": {
7+
"@antora/lunr-extension": "^1.0.0-alpha.8"
58
}
69
}

site.playbook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ site:
2929
antora:
3030
extensions:
3131
- require: ./boost.js
32+
- require: '@antora/lunr-extension'
3233

3334
content:
3435
sources:

0 commit comments

Comments
 (0)