File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ default_lang: "ko"
1313# Google Analytics
1414google_analytics : G-E2F9P3J8TQ # 실제 GA4 측정 ID로 교체 필요
1515
16+ # Google AdSense
17+ adsense :
18+ client : ca-pub-4992764083187170
19+ auto_ads : true
20+ show_ads : true
21+
1622# Build settings
1723markdown : kramdown
1824highlighter : rouge
Original file line number Diff line number Diff line change 1+ {% if site.adsense.client and site.adsense.show_ads and jekyll.environment == 'production' %}
2+ <!-- AdSense 배너 광고 -->
3+ < div class ="ad-container ">
4+ < ins class ="adsbygoogle "
5+ style ="display:block "
6+ data-ad-client ="{{ site.adsense.client }} "
7+ data-ad-slot ="{{ include.slot | default: 'auto' }} "
8+ data-ad-format ="auto "
9+ data-full-width-responsive ="true "> </ ins >
10+ < script >
11+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
12+ </ script >
13+ </ div >
14+ {% endif %}
Original file line number Diff line number Diff line change 1+ {% if site.adsense.client and site.adsense.show_ads and jekyll.environment == 'production' %}
2+ <!-- Google AdSense Auto Ads -->
3+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.adsense.client }} "
4+ crossorigin ="anonymous "> </ script >
5+ {% if site.adsense.auto_ads %}
6+ < script >
7+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( {
8+ google_ad_client : "{{ site.adsense.client }}" ,
9+ enable_page_level_ads : true
10+ } ) ;
11+ </ script >
12+ {% endif %}
13+ {% endif %}
Original file line number Diff line number Diff line change 5959
6060 <!-- Google Analytics -->
6161 {% include analytics.html %}
62+
63+ <!-- Google AdSense -->
64+ {% include adsense.html %}
6265</ head >
6366
6467< body >
Original file line number Diff line number Diff line change @@ -48,12 +48,18 @@ <h1 class="post-title">{{ page.title }}</h1>
4848 </ div >
4949 </ header >
5050
51+ <!-- 포스트 상단 광고 -->
52+ {% include adsense-banner.html %}
53+
5154 < div class ="post-content ">
5255 < div class ="container ">
5356 {{ content }}
5457 </ div >
5558 </ div >
5659
60+ <!-- 포스트 하단 광고 -->
61+ {% include adsense-banner.html %}
62+
5763 < footer class ="post-footer ">
5864 < div class ="container ">
5965 <!-- 네비게이션 -->
Original file line number Diff line number Diff line change @@ -1679,6 +1679,33 @@ a:hover {
16791679 }
16801680}
16811681
1682+ /* AdSense Styles */
1683+ .ad-container {
1684+ margin : 2rem 0 ;
1685+ text-align : center;
1686+ border-top : 1px solid var (--border-color );
1687+ border-bottom : 1px solid var (--border-color );
1688+ padding : 1rem 0 ;
1689+ background-color : var (--background-secondary );
1690+ }
1691+
1692+ .ad-container ::before {
1693+ content : "Advertisement" ;
1694+ display : block;
1695+ font-size : 0.75rem ;
1696+ color : var (--text-secondary );
1697+ margin-bottom : 0.5rem ;
1698+ text-transform : uppercase;
1699+ letter-spacing : 0.5px ;
1700+ }
1701+
1702+ @media (max-width : 768px ) {
1703+ .ad-container {
1704+ margin : 1.5rem 0 ;
1705+ padding : 0.75rem 0 ;
1706+ }
1707+ }
1708+
16821709@media (max-width : 480px ) {
16831710 .main-content {
16841711 margin-top : 90px !important ; /* 작은 모바일에서는 약간 줄임 */
You can’t perform that action at this time.
0 commit comments