I've got a template which I'm passing in some data to and it's all well and good to access in HTML tags that I'm generating, but I'm wanting to use it in some JavaScript that I'm outputting.
This is what I've tried to use:
coffeescript ->
$ ->
window.disqus_identifier= @Document.slug
window.disqus_developer= document.location.href.indexOf("localhost")
window.disqus_url= @Document.url
if typeof window.DISQUS isnt "undefined"
window.DISQUS.reset
reload: yes
config: ->
@page.identifier = @Document.slug
@page.url = @Document.url
But the problem is that @Document.slug (and others) aren't evaluated. Can I get them evaluated, and if so how?