mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-15 21:30:31 +00:00
openapi: fix theme switch #804
This commit is contained in:
parent
82c1b09c95
commit
131b3a9a01
4 changed files with 6 additions and 5 deletions
|
@ -217,7 +217,7 @@ function searchDetail( value ) {
|
|||
divsuggestion.className = 'autocomplete-suggestion';
|
||||
divsuggestion.setAttribute('data-term', value);
|
||||
divsuggestion.setAttribute('data-title', page.title);
|
||||
divsuggestion.setAttribute('href', baseUri + page.uri);
|
||||
divsuggestion.setAttribute('href', window.relearn.baseUri + page.uri);
|
||||
divsuggestion.setAttribute('data-context', context);
|
||||
var divtitle = document.createElement('div');
|
||||
divtitle.className = 'title';
|
||||
|
@ -289,7 +289,7 @@ function startSearch(){
|
|||
divsuggestion.className = 'autocomplete-suggestion';
|
||||
divsuggestion.setAttribute('data-term', term);
|
||||
divsuggestion.setAttribute('data-title', page.title);
|
||||
divsuggestion.setAttribute('data-uri', baseUri + page.uri);
|
||||
divsuggestion.setAttribute('data-uri', window.relearn.baseUri + page.uri);
|
||||
divsuggestion.setAttribute('data-context', context);
|
||||
var divtitle = document.createElement('div');
|
||||
divtitle.className = 'title';
|
||||
|
|
|
@ -390,6 +390,7 @@ function initOpenapi( update, attrs ){
|
|||
|
||||
}
|
||||
function renderOpenAPI(oc) {
|
||||
var baseUri = window.relearn.baseUri;
|
||||
var mod = window.relearn.themeVariantModifier;
|
||||
var buster = window.themeUseOpenapi.assetsBuster ? '?' + window.themeUseOpenapi.assetsBuster : '';
|
||||
var print = isPrint || attrs.isPrintPreview ? "PRINT-" : "";
|
||||
|
@ -1523,7 +1524,7 @@ if( window.themeUseMermaid ){
|
|||
|
||||
function useOpenapi( config ){
|
||||
if( config.css && config.css.startsWith( '/' ) ){
|
||||
config.css = baseUri + config.css;
|
||||
config.css = window.relearn.baseUri + config.css;
|
||||
}
|
||||
}
|
||||
if( window.themeUseOpenapi ){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue