Skip to content

Commit ffb942d

Browse files
committed
refactor: [docs] Remove Adsterra ads
It is found that Adsterra ads are malware and had negative impact on site performance. Site viewers complained multiple times and this is documented in blogs easily found by google search. So it makes sense to remove this now and use another ad network. Another change done is to remove ads styles from theme styles as this is not part of the theme so should not be defined here instead use a static style CSS file.
1 parent f6a176f commit ffb942d

File tree

12 files changed

+4
-188
lines changed

12 files changed

+4
-188
lines changed

assets/styles/_main.scss

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -483,52 +483,3 @@ hr {
483483
border: none;
484484
}
485485
}
486-
487-
.ads {
488-
display: flex;
489-
flex-flow: row wrap;
490-
align-items: center;
491-
justify-content: space-around;
492-
margin: $spacer-normal 0;
493-
494-
&.left {
495-
justify-content: flex-start;
496-
}
497-
498-
@media print {
499-
display: none;
500-
}
501-
502-
a {
503-
text-decoration: underline;
504-
font-size: $font-size-smaller;
505-
506-
@include themed {
507-
color: t($text-brighter);
508-
}
509-
}
510-
511-
&.buttons {
512-
@media ($phone) {
513-
flex-direction: column;
514-
}
515-
}
516-
517-
.banner {
518-
margin: $spacer-normal 0;
519-
520-
&--desktop {
521-
@media ($phone) {
522-
display: none;
523-
}
524-
}
525-
526-
&--mobile {
527-
display: none;
528-
529-
@media ($phone) {
530-
display: block;
531-
}
532-
}
533-
}
534-
}

exampleSite/assets/scripts/ads.js

Lines changed: 0 additions & 90 deletions
This file was deleted.

exampleSite/config/production/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
googleAnalytics = "G-FX00ZBCNBW"
22
enableGitInfo = true
33

4-
[params]
5-
show_ads = true
6-
74
[params.git_info]
85
host = "github"
96
user = "manid2"

exampleSite/content/about.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ toc = false
66

77
Hugo theme designed for reading and printing text with dark and light modes.
88

9-
{{< ads >}}
10-
119
Features
1210
--------
1311

14-
{{< ads >}}
15-
1612
### Distinguishing features
1713

1814
* Designed for __reading__ and __printing__ text.
@@ -32,8 +28,6 @@ Features
3228
from the [HSL colors][8].
3329
* Website banner is supported.
3430

35-
{{< ads >}}
36-
3731
### Adopted features
3832

3933
* Minimal configuration.
@@ -50,8 +44,6 @@ Features
5044
* Tightly coupled with Hugo extended latest version (v1.110.0) to compile and
5145
generate asset bundles with pipelines, fingerprinting and minification.
5246

53-
{{< ads >}}
54-
5547
### Other features
5648

5749
These are supported due to [panr/terminal][1] theme base code but not
@@ -61,8 +53,6 @@ tested as I don't use them myself:
6153
* Images in post with caption.
6254
* Comments.
6355

64-
{{< ads >}}
65-
6656
Installation
6757
------------
6858

@@ -149,8 +139,6 @@ Local development
149139
hugo server --source exampleSite
150140
```
151141

152-
{{< ads >}}
153-
154142
Credits
155143
-------
156144

@@ -169,8 +157,6 @@ License
169157

170158
[GNU General Public License v3.0][11]
171159

172-
{{< ads >}}
173-
174160
[1]: https://github.com/panr/hugo-theme-terminal
175161
[2]: https://github.com/adityatelange/hugo-PaperMod
176162
[3]: https://github.com/kaitlinmctigue/kaitlinmctigue.github.io

exampleSite/content/docs/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ author = "Mani Kumar"
1010

1111
This page shows the list of items which are not articles and don't need a
1212
date, author and other meta data associated. They are like simple documents.
13-
14-
{{< ads >}}

exampleSite/content/docs/commands/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description = "Linux developer commands collection"
44
date = "2023-07-15"
55
author = "Mani Kumar"
66
+++
7-
8-
{{< ads >}}

exampleSite/content/posts/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description = "Blog posts"
44
date = "2023-07-15"
55
author = "Mani Kumar"
66
+++
7-
8-
{{< ads >}}

exampleSite/content/slides/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description = "hugo-xterm slides using reveal.js"
44
date = "2022-07-15"
55
author = "Mani Kumar"
66
+++
7-
8-
{{< ads >}}

exampleSite/layouts/partials/extend_footer.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

exampleSite/layouts/shortcodes/ads.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

exampleSite/static/ads.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"scripts": {
77
"g-fmt": "prettier --config '.prettier.json' --write 'layouts/**/*.html' 'exampleSite/layouts/**/*.html'",
88
"g-fmt-check": "prettier --config '.prettier.json' --check 'layouts/**/*.html' 'exampleSite/layouts/**/*.html'",
9-
"j-fmt": "prettier --config '.prettier.json' --write 'assets/scripts/*.js' 'exampleSite/assets/scripts/*.js'",
10-
"j-fmt-check": "prettier --config '.prettier.json' --check 'assets/scripts/*.js' 'exampleSite/assets/scripts/*.js'",
11-
"j-lint": "eslint 'assets/scripts/*.js' 'exampleSite/assets/scripts/*.js'",
12-
"j-lint-fix": "eslint --fix 'assets/scripts/*.js' 'exampleSite/assets/scripts/*.js'",
9+
"j-fmt": "prettier --config '.prettier.json' --write 'assets/scripts/*.js'",
10+
"j-fmt-check": "prettier --config '.prettier.json' --check 'assets/scripts/*.js'",
11+
"j-lint": "eslint 'assets/scripts/*.js'",
12+
"j-lint-fix": "eslint --fix 'assets/scripts/*.js'",
1313
"m-links-check": "linkinator --config '.linkinator.config.json' 'README.md' 'exampleSite/content/**/*.md'",
1414
"m-lint": "markdownlint --config '.markdownlint.json' 'README.md' 'exampleSite/content/**/*.md'",
1515
"s-fmt": "prettier --config '.prettier.json' --write 'assets/styles/*.scss'",

0 commit comments

Comments
 (0)