Hi TP,
2012/6/25 TP <[email protected]>:
> On Fri, Jun 22, 2012 at 5:59 AM, Tobias Oberstein
> <[email protected]> wrote:
>> Is there a way to add some JS to $(document).ready() for every page
>> generated by Sphinx via configuration (thus avoid patching the generated
>> stuff afterwards)?
>
> You can do this by using the *basic* theme's *extrahead* "block". See
> [1] for details.
>
> [1] http://sphinx.pocoo.org/templating.html
Another method is also introduced.
Supposing you are using a sphinx theme (not customized theme), please
write "$(document).ready()" in "_static/some.js" and add the following
codes into "conf.py"::
def setup(app):
app.add_javascript('some.js')
.. seealso::
http://sphinx.pocoo.org/ext/appapi.html#sphinx.application.Sphinx.add_javascript
Best regards.
--
Takayuki SHIMIZUKAWA
Sphinx-users.jp
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.