javascript - SPHINX 引导主题 | 无法正常工作
问题描述
我正在将 Sphinx 文档read_the_docs
从sphinx_bootstrap_theme
. 我有问题,而且很多。
问题 1:Bootstrap 主题没有加载 javascript 部分 虽然主题的大部分 CSS 都在工作,但依赖于 JQuery 的 Javascript 部分没有被加载。
我尝试了什么:
Insert the cdn for JQuery in my layout.html. Didn't work.
问题 2:导航栏无法正常工作
我得到了导航栏的大部分内容。链接是标题,搜索框。但是CSS完全搞砸了。
The title is on the right, the navigation menu is is a list view on the left.
问题 3:侧边栏目录不起作用
我希望我globaltoc.html
出现在左侧边栏中。目前除了TABLE OF CONTENTS
我在那里硬编码的标题之外,它没有显示任何内容。
到目前为止我做了什么:
Created a `globaltoc.html` and inserted the following:
{#
basic/globaltoc.html
~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: global table of contents.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table of Contents') }}</a></h3>
{{ toctree() }}
我真的很想得到一些帮助,包括以下内容。我真的对这个框架感到困惑。即使你指点我某个地方寻求帮助,那也很棒。
因此,总结问题并帮助您回答。
- 如何包含 JS,以及 JQuery 对 sphinx 项目的依赖?
- 如何确保所有引导 CSS 类按预期工作?
- 如何正确显示每个页面中的目录?
解决方案
推荐阅读
- javascript - 如何根据选项值对包装器 div 中的“大厅”框进行排序(按字母顺序、重新按字母顺序、按容量)?
- javascript - 从 JSON 文件中获取数据以填充下拉列表并在选择下拉列表中显示其他数据
- javascript - 在 Javascript 中更新 DOM 时调用函数
- c++ - 将对象更改为对象指针时程序无法正常工作
- rust - 从 rust 中的 json 数据静态编译实例
- php - 使用PHP在运行时更改数值的基础上动态生成输入字段
- html - 提交后如何不清除或重置表单?
- flutter - 颤振:如何将蜂巢监视绑定到 getx 中的 RxList 对象
- routes - Route Model Binding 在 Laravel 中只返回一条记录
- c# - 使用以下方法更改对象颜色:
().material.SetColor