Re: "search.html doesn't look like a Sphinx search page"

2012-02-23 Thread Jakub Wilk

* Pietro Battiston , 2012-02-22, 03:37:

I'm trying to adopt dh_sphinxdoc, but it dies with the following error:

dh_sphinxdoc:
debian/python-sqlkit-doc/usr/share/doc/python-sqlkit-doc/html/search.html 
doesn't look like a Sphinx search page

[snip]

I uploaded a copy for your convenience at¹
http://pietrobattiston.it/c/search.html

So finally I'd appreciate any pointer on why _this_ is not recognized.


dh_sphinxdoc looks for the following string:

jQuery(function() { Search.loadIndex("searchindex.js"); });

This is how the search page would normally load search index. If the 
line is not present it can mean that:

1) search.html is not what dh_spinxdoc thinks it is, or
2) the templates were inadvertently “customized” to the point the index 
is not loaded (correctly).


Now, your page does this instead:



This is how older versions of Sphinx used to load the index, and 
accidentally this method still works. (Though I cannot guarantee it'll 
continue to work in future versions of Sphinx.) If you insist, I can 
“fix” dh_sphinxdoc to recognize the other snippet as well.


However, it shall be noted that there are bigger issues with your 
documentation than that. The package appears to be using some 
non-default template language (mako?). This won't fly with recent 
versions of Sphinx, since it uses Jinja2 templates for its own purposes. 
As as consequence, you get such funny as:


  div.sphinxsidebar {
  float: left;
  width: {{ theme_sidebarwidth|toint }}px;
  margin-left: -100%;
  font-size: 90%;
  }

in default.css or:

  var stopwords = {{ search_language_stop_words }};

in searchtools.js.


Also, please remove Google Analytics code, and references to other 
JavaScript code and CSS hosted on external websites. I don't want to be 
tracked when viewing local documentation. :<


--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120223225302.gb8...@jwilk.net



Re: "search.html doesn't look like a Sphinx search page"

2012-02-23 Thread Paul Wise
On Fri, Feb 24, 2012 at 6:53 AM, Jakub Wilk wrote:

> Also, please remove Google Analytics code, and references to other
> JavaScript code and CSS hosted on external websites. I don't want to be
> tracked when viewing local documentation. :<

That sounds like an RC bug; things in main depending on stuff not in Debian.

I wonder if we need some lintian warnings about this sort of thing.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caktje6fr88n9m5ns5oi-g0otfqesveswcphwoggj1vnnx--...@mail.gmail.com