Skip to content

Commit

Permalink
Merge pull request #1396 from jayaddison/issue-1198/sphinx-search-mai…
Browse files Browse the repository at this point in the history
…ntenance

Maintenance: restore Sphinx documentation seach functionality
  • Loading branch information
dbogdanov authored Feb 2, 2024
2 parents b584c9b + d565ff2 commit 99927b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential libeigen3-dev libyaml-dev libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libsamplerate0-dev libtag1-dev libchromaprint-dev python3-dev python3-numpy-dev python3-numpy python3-yaml python3-six
sudo apt-get install -y doxygen python3-pip pandoc
pip3 install sphinx pyparsing sphinxcontrib-doxylink docutils jupyter sphinxprettysearchresults sphinx-toolbox
pip3 install sphinx pyparsing sphinxcontrib-doxylink docutils jupyter sphinx-toolbox
# Install TensorFlow
sudo sh src/3rdparty/tensorflow/setup_from_libtensorflow.sh
# Install Gaia dependencies
Expand Down
24 changes: 4 additions & 20 deletions doc/sphinxdoc/_templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,10 @@ <h1 id="search-documentation">Search</h1>
{% endblock %}

{% block extrafooter %}
<script>
jQuery = $;
$('#fallback').hide();
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '{{version}}',
COLLAPSE_INDEX: false,
SOURCELINK_SUFFIX: '.txt',
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};

</script>
<script src="{{ pathto("_static/underscore.js", 1) }}"></script>
<script src="{{ pathto("_static/doctools.js", 1) }}"></script>
<script src="{{ pathto("_static/documentation_options.js", 1) }}"></script>
<script src="{{ pathto("_static/searchtools.js", 1) }}"></script>
<script>
jQuery(function() {
Search.loadIndex('searchindex.js');
});
</script>
<script id="searchindexloader"></script>
<script src="{{ pathto("_static/sphinx_highlight.js", 1) }}"></script>
<script src="{{ pathto("_static/language_data.js", 1) }}"></script>
<script src="{{ pathto("searchindex.js", 1) }}" defer></script>
{% endblock %}
2 changes: 1 addition & 1 deletion doc/sphinxdoc/_templates/sphinxdoc_mtg/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{%- endif %}
{%- endmacro %}

<html lang="en">
<html{% if language is not none %} lang="{{ language }}"{% endif %} data-content_root="{{ content_root }}">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
Expand Down
6 changes: 5 additions & 1 deletion doc/sphinxdoc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.viewcode',
'sphinxcontrib.doxylink',
'sphinxprettysearchresults',
# 'sphinxprettysearchresults',
'sphinx.ext.autosectionlabel',
'sphinx_toolbox.collapse']

Expand Down Expand Up @@ -116,6 +116,10 @@
# a list of builtin themes.
html_theme = 'sphinxdoc_mtg'

# If true, the text around the keyword is shown as summary of each search result.
# Default is True.
html_show_search_summary = False

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_templates']

Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxdoc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Install doxigen and pip3. If you are on Linux::

Install additional dependencies (you might need to run this command with sudo)::

pip3 install sphinx pyparsing sphinxcontrib-doxylink docutils jupyter sphinxprettysearchresults sphinx-toolbox
pip3 install sphinx pyparsing sphinxcontrib-doxylink docutils jupyter sphinx-toolbox
sudo apt-get install pandoc

Make sure to build Essentia with Python 3 bindings and run::
Expand Down

0 comments on commit 99927b7

Please sign in to comment.