New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak Sphinx search for ZFS - fixes 437 #468

Merged
merged 3 commits into from Aug 7, 2014
Jump to file or symbol
Failed to load files and symbols.
+22 −2
Diff settings

Always

Just for now

View
@@ -54,7 +54,26 @@
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# We define our own to improve search results slightly.
from sphinx.search.en import SearchEnglish
from sphinx.search import languages as sphinx_languages
class FlockerLanguage(SearchEnglish):
"""
Workaround for https://bitbucket.org/birkenfeld/sphinx/issue/1529/
"""
lang = 'flocker'
def word_filter(self, word):
"""
Only omit stop words; default also omits words shorter than 3
characters which breaks search for "ZFS" since stemming turns that into
"zf".
"""
return word not in self.stopwords
sphinx_languages['flocker'] = FlockerLanguage
language = 'flocker'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
View
@@ -106,7 +106,7 @@ def run(self):
extras_require={
# This extra allows you to build the documentation for Flocker.
"doc": ["Sphinx==1.2", "sphinx-rtd-theme==0.1.6"],
"doc": ["Sphinx==1.2.2", "sphinx-rtd-theme==0.1.6"],
# This extra is for developers who need to work on Flocker itself.
"dev": [
# flake8 is pretty critical to have around to help point out
View
@@ -30,4 +30,5 @@ basepython = python2.7
changedir = {toxinidir}
commands =
pip install Flocker[doc]
rm -rf docs/_build/html
sphinx-build -a -b html docs/ docs/_build/html
ProTip! Use n and p to navigate between commits in a pull request.