Skip to content

Commit

Permalink
Turn off ads on 404 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 10, 2024
1 parent 1fb409a commit fbd1233
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
</main>
<script>plausible("404",{ props: { path: document.location.pathname } });</script>
{{ end }}

{{ define "ads" }}
<!-- No ads on 404 pages -->
{{ end }}
2 changes: 2 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
<link rel="canonical" href="https://www.wimods.net{{ .RelPermalink }}">

{{ partialCached "plausible" . }}
{{ block "ads" . -}}
<script async src="/js/quantcast-choice.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5218363098774955" crossorigin="anonymous"></script>
{{- end }}

</head>
<body>
Expand Down

0 comments on commit fbd1233

Please sign in to comment.