我正在尝试在我的网站上安装Disqus,但它不工作。看起来我没有把它设置好。
我只有一个空白的部分,正如你在上面看到的:
34.207.144.128/tweets.html。
这是我的代码,我做错了什么吗?
有没有人能帮我一下,这是为了我的学校申请;
<!DOCTYPE html>
<html>
<head>
<script src="behavior.js"></script>
<title>
Aouni Karim webpages
</title>
<meta charset="UTF-8">
</head>
<link href="https://apply.holbertonschool.com/level2/school.css" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
<body class="works_on_smartphone">
<a href="https://apply.holbertonschool.com"target="blank" >
<img src="https://apply.holbertonschool.com/holberton-logo.png">
</a>
<header>
<ul><a href="http://34.207.144.128/whatsableton.html"> What is ableton ?</a></ul>
<ul><a href="http://34.207.144.128/whenitwascreate.html">When it was create ?</a><\
/ul>
<ul><a href="http://34.207.144.128/whychooseableton.html">Why choose ableton ?</a>\
</ul>
</header>
<main>
<article>
<h1> WHAT IS ABELETON LIVE ?</h1>
<img src="https://img.audiofanzine.com/images/u/product/normal/ableton-live-11-s\
tandard-288625.png"id="smart_thumbnail" >
<p>
Ableton live is a DAW, a digital audio workstation. A software allowing to recordi\
ng, to edit, to manipulate, to create and to play digital audio content which can be lyr\
ics , music or sound effects. They allow the mixing of several audio tracks on a time gr\
id. You can use audio effect such as filter, delay or reverb to create more creative sou\
nd. Feel free to learn more on <a href="https://www.ableton.com/"target="blank" >Ableton\
live.</a></p>
<h2>When it was create ?</h2>
<p>
Ableton was founded in Germany in 1999. The first version of Live appeared on the \
market in 2001. The company is made up of about fifty people, including computer enginee\
rs, marketing specialists. The company is managed by Gerhard Behles and Bernd Roggendorf\
, its founders, and Jan Bohl. Most of Ableton's employees are involved in both productio\
n and creation of music.</p>
<h3>Why choose Ableton live ?</h3>
<p>
Ableton live contains a navigation panel for easily reaching all sound, effect, and\
instrument packs. There are 2 views: the session screen and the arrangement screen. The\
session screen allows you to order clips and is therefore organized around loops. The \
arrangement screen can be used live to record all the scenes of the session. It allows you\
u to control the parameters of the tracks (plugins, effects). Ableton live already inclu\
des effects but it are possible to download standard effects: VST.</p>
<p>
Ableton's ergonomics make it a very flexible and easy-to-access software. Effe\
ct or instrument can be added to it by a simple drag and drop. We can use it in an amate\
ur way but it has all the features that professionals will appreciate.</p>
</article>
<aside>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = 34.207.144.128/tweets.html; // Replace PAGE_URL with your pag\
e's canonical URL variable
this.page.identifier = aouni_karim; // Replace PAGE_IDENTIFIER with your page'\
s unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://http-34-207-144-128-tweets-html.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_\
noscript">comments powered by Disqus.</a></noscript>
</aside>
<footer>
<p>Made by Karim Aouni for <a href="https://apply.holbertonschool.com" target="_\
blank">Holberton School</a>.</p>
</footer>
</main>
</body>
</html>正如您所看到的,似乎有几行代码没有包含在内,所以我的HTML和技术Disqus无法识别它。
有人能给我解释一下我能做什么吗?
谢谢
谢谢
发布于 2021-11-25 10:06:59
您需要在内联JavaScript的disqus_config函数中将字符串值封装在quotations ''中。如果没有引号,JavaScript会将字符串解释为未定义的变量。
即用'aouni_karim'代替aouni_karim
let name = 'aouni_karim'
// vs
let name = aouni_karim试试这个:
<script>
var disqus_config = function () {
this.page.url = '34.207.144.128/tweets.html';
this.page.identifier = 'aouni_karim';
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://http-34-207-144-128-tweets-html.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>发布于 2021-11-25 10:39:04
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url ='http://34.207.144.128/tweets.html'; // Replace PAGE_URL with y\
our page's canonical URL variable
this.page.identifier ='aounikarim'; // Replace PAGE_IDENTIFIER with your page'\
s unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://aounikarim.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_\
noscript">comments powered by Disqus.</a></noscript>它仍然不能工作,我在控制台中有这个:
cdn.viglink.com/images/pixel.gif?ch=2&rn=5.85340588037942:1 Failed to
load resource: net::ERR_BLOCKED_BY_CLIENThttps://stackoverflow.com/questions/70108935
复制相似问题