File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 39
39
</ script >
40
40
< script type ="text/javascript " src ="{{ "js /script.js" | relURL }}"> </ script >
41
41
< script type ="text/javascript " src ="{{ "js /lunr.min.js" | relURL}}"> </ script >
42
- < script type ="text/javascript ">
43
- var baseurl = "{{.Site.BaseURL}}" ;
42
+ < a id ="indexJSON " href ="{{ ". /index.json" | relURL}}"> </ a >
44
43
45
- </ script >
46
44
< script type ="text/javascript " src ="{{ "js /auto-complete.js" | relURL}}"> </ script >
47
45
< script type ="text/javascript " src ="{{ "js /search.js" | relURL}}"> </ script >
48
46
< script type ="text/javascript " src ="{{ "js /asciinema-player.js" | relURL}}"> </ script >
Original file line number Diff line number Diff line change @@ -7,12 +7,8 @@ function endsWith(str, suffix) {
7
7
8
8
// Initialize lunrjs using our generated index file
9
9
function initLunr ( ) {
10
- if ( ! endsWith ( baseurl , "/" ) ) {
11
- baseurl = baseurl + '/'
12
- } ;
13
-
14
10
// First retrieve the index file
15
- $ . getJSON ( baseurl + "index.json" )
11
+ $ . getJSON ( $ ( '#indexJSON' ) . attr ( 'href' ) )
16
12
. done ( function ( index ) {
17
13
pagesIndex = index ;
18
14
// Set up lunrjs by declaring the fields we use
@@ -74,9 +70,6 @@ $( document ).ready(function() {
74
70
item . context = text ;
75
71
76
72
var pathItem = item . uri ;
77
- if ( pathItem . startsWith ( baseurl ) ) {
78
- pathItem = pathItem . slice ( baseurl . length ) ;
79
- }
80
73
if ( endsWith ( pathItem , "/" ) ) {
81
74
pathItem = pathItem . substring ( 0 , pathItem . length - 1 ) ;
82
75
} ;
Original file line number Diff line number Diff line change 309
309
< a sm-item href ="# " [routerLink] ="['settings', 'queue'] "> {{ 'admin_queue_title' | translate }}</ a >
310
310
< div class ="divider "> </ div >
311
311
< a sm-item href ="# " [routerLink] ="['settings', 'downloads'] "> {{ 'navbar_downloads' | translate }}</ a >
312
- < a sm-item href ="/ docs " target ="_blank " rel ="noopener noreferrer "> {{ 'navbar_documentation' | translate }}</ a >
312
+ < a sm-item href ="# " [routerLink] =" [' docs', ''] " target ="_blank " rel ="noopener noreferrer "> {{ 'navbar_documentation' | translate }}</ a >
313
313
< div class ="divider "> </ div >
314
314
< sm-checkbox class ="theme-switch " name ="switch-theme " [control] ="themeSwitch " type ="toggle "
315
315
label ="{{'navbar_dark_mode' | translate}} " (change) ="changeTheme() "> </ sm-checkbox >
You can’t perform that action at this time.
0 commit comments