Merge pull request #3595 from radarhere/sphinx

Moved docs JS file into custom directory
This commit is contained in:
Hugo 2019-01-24 23:19:39 +02:00 committed by GitHub
commit 0c3e1fa77e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = ['_static', 'resources']
# Add any extra paths that contain custom files (such as robots.txt or # Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied # .htaccess) here, relative to this directory. These files are copied

View File

@ -5,7 +5,7 @@ jQuery(document).ready(function ($) {
$section.children('.section, .function, .method').each(function () { $section.children('.section, .function, .method').each(function () {
if ($(this).hasClass('section')) { if ($(this).hasClass('section')) {
sectionID = $(this).attr('id'); sectionID = $(this).attr('id');
search($(this), $sidebarItem.parent().find('[href=#'+sectionID+']')); search($(this), $sidebarItem.parent().find('[href="#'+sectionID+'"]'));
} else { } else {
var $dt = $(this).children('dt'); var $dt = $(this).children('dt');
var id = $dt.attr('id'); var id = $dt.attr('id');
@ -48,7 +48,7 @@ jQuery(document).ready(function ($) {
} }
}); });
}; };
search($('[itemprop=articleBody] > .section'), $('.wy-nav-side a[href=#]')); search($('[itemprop=articleBody] > .section'), $('.wy-nav-side a[href="#"]'));
}, 0); }, 0);
$(window).on('hashchange', function () { $(window).on('hashchange', function () {
$('ul[data-sectionID]').each(function () { $('ul[data-sectionID]').each(function () {