Skip to content

Commit

Permalink
Fix #11: Change app.add_javascript and app.add_stylesheet (#12)
Browse files Browse the repository at this point in the history
* Fix #11: Do not use add_javascript and add_stylesheet obsolete methods
  • Loading branch information
kujiu committed Aug 30, 2020
1 parent addec8d commit 22b4219
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinxcontrib/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ def install_backend_static_files(app, env):
copyfile(source_file_path, dest_file_path)

if dest_file_path.endswith('.js'):
app.add_javascript(os.path.relpath(dest_file_path, STATICS_DIR_PATH))
app.add_js_file(os.path.relpath(dest_file_path, STATICS_DIR_PATH))
elif dest_file_path.endswith('.css'):
app.add_stylesheet(os.path.relpath(dest_file_path, STATICS_DIR_PATH))
app.add_css_file(os.path.relpath(dest_file_path, STATICS_DIR_PATH))


def download_images(app, env):
Expand Down

0 comments on commit 22b4219

Please sign in to comment.