File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ pagination:
341341 # collection: 'posts'
342342
343343 # How many objects per paginated page, used to be `paginate` (default: 0, means all)
344- per_page : 10
344+ per_page : 5
345345
346346 # The permalink structure for the paginated pages (this can be any level deep)
347347 permalink : ' /page/:num/' # Pages are index.html inside this folder (default)
Original file line number Diff line number Diff line change 33// blog-post ๋ด์ AdSense in article ์ฝ๋ ์ฝ์
.
44function insertAdInRandomLocation ( ) {
55 var adCode =
6- `
7- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1101850893094860"
6+ `<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1101850893094860"
87 crossorigin="anonymous"></script>
98 <ins class="adsbygoogle"
109 style="display:block; text-align:center;"
Original file line number Diff line number Diff line change 11// Minjun 2023
22
3- // blog-post ๋ด์ AdSense in feed ์ฝ๋ ์ฝ์
.
3+ // posts-list ๋ง์ง๋ง์ AdSense ์ฝ์
44function insertAdInRandomLocation ( ) {
5- var elements = document . querySelectorAll ( '.post-preview ' ) ;
6- var randomIndex = Math . floor ( Math . random ( ) * elements . length ) ;
7- var randomElement = elements [ randomIndex ] ;
5+ var element = document . querySelector ( '.posts-list ' ) ;
6+ // var randomIndex = Math.floor(Math.random() * elements.length);
7+ // var randomElement = elements[randomIndex];
88
99 let adCode =
1010 `<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1101850893094860"
@@ -19,8 +19,9 @@ function insertAdInRandomLocation() {
1919 <script>
2020 (adsbygoogle = window.adsbygoogle || []).push({})
2121 </script>`
22+
2223
23- randomElement . insertAdjacentHTML ( 'afterend ' , adCode ) ;
24+ element . insertAdjacentHTML ( 'beforeend ' , adCode ) ;
2425}
2526
2627document . addEventListener ( "DOMContentLoaded" , insertAdInRandomLocation ) ;
You canโt perform that action at this time.
0 commit comments