File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
- ## Release 0.9.0 (development release)
1
+ ## Release 0.9.0
2
2
3
3
### Contributors
4
4
5
5
This release contains contributions from (in alphabetical order):
6
6
7
+ - [ Andrew Gardhouse] ( https://github.com/AndrewGardhouse )
8
+
9
+ ### Features
10
+
11
+ - Project filter is now passed to search options when ` search_on_pennylane_ai ` is ` True `
12
+
7
13
## Release 0.8.0
8
14
9
15
### Contributors
Original file line number Diff line number Diff line change 1
1
{% if theme_search_on_pennylane_ai|lower == 'true' %}
2
2
<!-- If JavaScript is enabled, redirect users to https://pennylane.ai/search. -->
3
3
< script type ="text/javascript ">
4
+ const DOC_PROJECTS = [
5
+ { urlPath : '/projects/catalyst/' , project : 'catalyst' } ,
6
+ { urlPath : '/projects/lightning/' , project : 'pennylane-lightning' } ,
7
+ { urlPath : '/projects/qiskit/' , project : 'pennylane-qiskit' } ,
8
+ ]
9
+
4
10
const search_version = window . location . pathname . includes ( "/latest/" ) ? "latest" : "stable" ;
5
11
const search_query = new URLSearchParams ( window . location . search ) . get ( "q" ) || "" ;
6
- const search_options = { contentType : "DOC" , q : search_query , version : search_version } ;
12
+ const search_project = DOC_PROJECTS . find ( ( project ) => {
13
+ return window . location . pathname . includes ( project . urlPath )
14
+ } )
15
+ const search_options = {
16
+ contentType : 'DOC' ,
17
+ q : search_query ,
18
+ version : search_version ,
19
+ project : search_project ? search_project . project : 'pennylane' ,
20
+ }
7
21
8
22
const redirect_page = "https://pennylane.ai/search" ;
9
23
const redirect_query_params = Object . entries ( search_options ) . map ( ( [ k , v ] ) => `${ k } =${ v } ` ) . join ( "&" ) ;
You can’t perform that action at this time.
0 commit comments