Stopped the disqus JS being loaded on the front page.

Noticed that every hit to the front page was attempting to download the
embed.js from disqus. I have modified the template so that it is only
loaded on a post page (where it should have been in the first place)
This commit is contained in:
Robert McGovern 2024-11-05 19:07:43 +00:00
parent 14c2c4686d
commit ffd264f5e6
4 changed files with 30 additions and 4 deletions

28
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,28 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "edge",
"version": "stable",
"request": "launch",
"name": "Launch Edge against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "11ty",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/eleventy",
"stopOnEntry": false,
"args": ["--watch"],
"cwd": "${workspaceRoot}",
"console": "internalConsole"
}
]
}

View File

@ -35,8 +35,5 @@
{% include footer.html %} {% include footer.html %}
</footer> </footer>
</div> </div>
{% include scripts.html %}
</body> </body>
</html> </html>

View File

@ -74,6 +74,7 @@ layout: default
{% endcomment %} {% endcomment %}
{% if site.comments.provider and comments or site.defaults.posts.comments %} {% if site.comments.provider and comments or site.defaults.posts.comments %}
{% include comments.html %} {% include comments.html %}
{% include comments-providers/scripts.html %}
{% endif %} {% endif %}
</article> </article>

View File

@ -19,7 +19,7 @@
{% endif %} {% endif %}
{% include analytics.html %} {% include analytics.html %}
{% include comments-providers/scripts.html %} <!-- {% include comments-providers/scripts.html %} -->
{% if site.after_footer_scripts %} {% if site.after_footer_scripts %}
{% for script in site.after_footer_scripts %} {% for script in site.after_footer_scripts %}