Replies: 2 comments 2 replies
-
def insert_javascript_on_xxx_page(app, page_name, template_name, context, doctree):
if page_name == 'xxx_page':
app.add_js_file('script.js')
def setup(app):
app.connect('html-page-context', insert_javascript_on_xxx_page) |
Beta Was this translation helpful? Give feedback.
2 replies
-
thanks to @mgeier and @AA-Turner : i should be able to figure something out. closing this for now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I am working on some code that should be stored in a js file, and added to the website.
Using the
add_js_file
in the setup section of an extension, I am able to add it to every page on the website - a good start !Doing an extensive search allowed me to discover that I could add it to a single page - #8631 - or so I believe ? This pydata theme docs lets me think so ?
Am I misunderstanding something ? If I am correct, how should I be able to add the js file to a given page ?
Thanks in advance, I can detail what I tried so far if needed :)
Beta Was this translation helpful? Give feedback.
All reactions