File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ interface Props {
3+ siteId: string
4+ pageURL: string
5+ pageIdentifier: string
6+ }
7+
8+ const { siteId, pageURL, pageIdentifier } = Astro .props
9+ ---
10+
11+ <div id =" disqus_thread" ></div >
12+ <script define:vars ={ { siteId , pageURL , pageIdentifier }} >
13+ var disqus_config = function () {
14+ this.page.url = pageURL
15+ this.page.identifier = pageIdentifier
16+ }
17+ ;(function () {
18+ // DON'T EDIT BELOW THIS LINE
19+ var d = document,
20+ s = d.createElement('script')
21+ s.src = `https://${siteId}.disqus.com/embed.js`
22+ s.setAttribute('data-timestamp', new Date().toString())
23+ ;(d.head || d.body).appendChild(s)
24+ })()
25+ </script >
26+ <noscript >
27+ Please enable JavaScript to view the
28+ <a href =" https://disqus.com/?ref_noscript" >comments powered by Disqus.</a >
29+ </noscript >
Original file line number Diff line number Diff line change @@ -49,5 +49,8 @@ export default {
4949 swetrix : {
5050 projectId : env . SWETRIX_ID ,
5151 } ,
52+ disqus : {
53+ siteId : env . DISQUS_ID ,
54+ } ,
5255 }
5356}
You can’t perform that action at this time.
0 commit comments