-
Notifications
You must be signed in to change notification settings - Fork 360
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
No proper rendering for <script>-embedded codes #6
Comments
I'm having the same problem. I'm using highlight.js for mi code snippets and when the syntax doesn't work after the ajax call |
I am also getting this problem. |
I had the same problem with prettify, the AJAX load doesn't tell the js plugin to rehighlight the post, so It's not done. A quick and dirty hack is adding the highlight/prettify script in post.hbs for now, or call the highlight js object when a new post is loaded on post.hbs (see below). Something like this for hljs in post.hbs.
|
Same here. Problems with Disqus due to AJAX. |
@zvolkov what problems are you having with Disqus? I managed to get it working in my fork OK. If I remember correctly all I did was edit post,hbs with the code you can see at the bottom of it. Fork is here: https://github.com/rastating/ghostwriter Hope that helps |
@rastating open dev tools / console, and see if you get errors when AJAX-navigating to "browse posts" and then to an individual post. Disqus does not seem to like being loaded by jquery.get multiple times. Because Disqus breaks, javascript execution is aborted, so my highlight.js script that follows Disqus won't run. I ended up getting rid of AJAX navigation and restructuring the index page to show multiple posts. See at http://zvolkov.com/clog |
Have a look at https://bensmann.no/dynamically-embedding-gists/ and http://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites for getting Github Gists and Disqus to work with the themes AJAX navigation. I've thought about including this functionality with the theme but it seems like it could be unnecessary bloat for most users. |
Please consider doing this. I love the theme but not having Gist embed functionality is kind of a deal breaker for me. |
Couldn't it be something optional using a configuration flag to enable it, disabled by default? |
@javaguirre possibly @arfon I've been thinking about rebuilding the theme using ReactJS, if I do I'll make sure to try and include support for things like PrismJS. Unsure of when I'll get around to it though... |
❤️ thanks. Totally understood that we're all in this thread asking you to do work for us 😄. |
Sorry, I couldn't find a proper title...
I just found out, that e.g. embedded GitHub Gists would not work, hence they are not gonna be rendered after the ajax call:
Is there a possibility to force rendering after getting the post?
I found out, that e.g. Youtube embedding works fine...
Regards,
Christoph
The text was updated successfully, but these errors were encountered: