Skip to content
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

Vue-based themes support #12

Open
dawidchyrzynski opened this issue Jul 2, 2022 · 4 comments
Open

Vue-based themes support #12

dawidchyrzynski opened this issue Jul 2, 2022 · 4 comments

Comments

@dawidchyrzynski
Copy link

Hi,

I noticed that your extension doesn't work properly in a Vue-based theme (for example: Sphinx Press theme)). The script tag generated by the library causes a JS error in the Vue which results in the white page. This issue is mentioned here: https://stackoverflow.com/questions/69514098/writing-javascript-code-in-a-component-using-vue

I think the best would be to add extra configuration property that lets the extension know that Vue is used.

@lcnittl
Copy link
Member

lcnittl commented Jul 4, 2022

Hi, yes sure! Do you know if there is a way to detect Vue during runtime? In this case we would not even need an option, but could just detect its use and change the js snippets as required.

@dawidchyrzynski
Copy link
Author

@lcnittl The most naive way would be to scan the theme's scripts looking for some Vue keywords (e.g. __isVue) but imo it's safer to leave this feature as a configurable option.

@dawidchyrzynski
Copy link
Author

@lcnittl any progress on this?

@lcnittl
Copy link
Member

lcnittl commented Oct 15, 2022

I am afraid no, but I am on vacation next week and can look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants