Skip to content

Commit 442106d

Browse files
author
윤창현
committed
ADD : [config] 구글 애드센스 추가
1 parent a247501 commit 442106d

File tree

2 files changed

+113
-44
lines changed

2 files changed

+113
-44
lines changed

_layouts/default.html

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@
3737
<div class="access">
3838
{% include_cached update-list.html lang=lang %}
3939
{% include_cached trending-tags.html lang=lang %}
40+
41+
<!-- Google Adsense : Side Bar -->
42+
<script
43+
async
44+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7625462844991697"
45+
crossorigin="anonymous"
46+
></script>
47+
<ins
48+
class="adsbygoogle"
49+
style="display: block"
50+
data-ad-client="ca-pub-7625462844991697"
51+
data-ad-slot="3495125557"
52+
data-ad-format="auto"
53+
data-full-width-responsive="true"
54+
></ins>
55+
<script>
56+
(adsbygoogle = window.adsbygoogle || []).push({});
57+
</script>
4058
</div>
4159

4260
{% for _include in layout.panel_includes %}
@@ -53,8 +71,24 @@
5371
{% assign _include_path = _include | append: '.html' %}
5472
{% include {{ _include_path }} lang=lang %}
5573
{% endfor %}
56-
74+
5775
{% include_cached footer.html lang=lang %}
76+
77+
<!-- Google Adsense : Blog Footer -->
78+
<script
79+
async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7625462844991697"
80+
crossorigin="anonymous">
81+
</script>
82+
<ins
83+
class="adsbygoogle"
84+
style="display:block"
85+
data-ad-format="autorelaxed"
86+
data-ad-client="ca-pub-7625462844991697"
87+
data-ad-slot="8005216200">
88+
</ins>
89+
<script>
90+
(adsbygoogle = window.adsbygoogle || []).push({});
91+
</script>
5892
</div>
5993
</div>
6094

_layouts/post.html

Lines changed: 78 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,27 @@
1616

1717
<article class="px-1" data-toc="{{ enable_toc }}">
1818
<header>
19+
<!-- Google Adsense : Post Header -->
20+
<script
21+
async
22+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7625462844991697"
23+
crossorigin="anonymous"
24+
></script>
25+
<ins
26+
class="adsbygoogle"
27+
style="display: block"
28+
data-ad-client="ca-pub-7625462844991697"
29+
data-ad-slot="1304076483"
30+
data-ad-format="auto"
31+
data-full-width-responsive="true"
32+
></ins>
33+
<script>
34+
(adsbygoogle = window.adsbygoogle || []).push({});
35+
</script>
36+
1937
<h1 data-toc-skip>{{ page.title }}</h1>
2038
{% if page.description %}
21-
<p class="post-desc fw-light mb-4">{{ page.description }}</p>
39+
<p class="post-desc fw-light mb-4">{{ page.description }}</p>
2240
{% endif %}
2341

2442
<div class="post-meta text-muted">
@@ -30,10 +48,10 @@ <h1 data-toc-skip>{{ page.title }}</h1>
3048

3149
<!-- lastmod date -->
3250
{% if page.last_modified_at and page.last_modified_at != page.date %}
33-
<span>
51+
<span>
3452
{{ site.data.locales[lang].post.updated }}
3553
{% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
36-
</span>
54+
</span>
3755
{% endif %}
3856

3957
{% if page.image %}
@@ -45,12 +63,12 @@ <h1 data-toc-skip>{{ page.title }}</h1>
4563
{%- capture lqip -%}lqip="{{ page.image.lqip }}"{%- endcapture -%}
4664
{% endif %}
4765

48-
<div class="mt-3 mb-3">
66+
<div class="mt-3 mb-3">
4967
<img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip }}>
50-
{%- if page.image.alt -%}
68+
{%- if page.image.alt -%}
5169
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
52-
{%- endif -%}
53-
</div>
70+
{%- endif -%}
71+
</div>
5472
{% endif %}
5573

5674
<div class="d-flex justify-content-between">
@@ -75,20 +93,20 @@ <h1 data-toc-skip>{{ page.title }}</h1>
7593
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
7694
{% endfor %}
7795
{% else %}
78-
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
96+
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
7997
{% endif %}
8098
</em>
8199
</span>
82100

83101
<div>
84102
<!-- pageviews -->
85103
{% if site.pageviews.provider and site.analytics[site.pageviews.provider].id %}
86-
<span>
87-
<em id="pageviews">
88-
<i class="fas fa-spinner fa-spin small"></i>
89-
</em>
90-
{{ site.data.locales[lang].post.pageview_measure }}
91-
</span>
104+
<span>
105+
<em id="pageviews">
106+
<i class="fas fa-spinner fa-spin small"></i>
107+
</em>
108+
{{ site.data.locales[lang].post.pageview_measure }}
109+
</span>
92110
{% endif %}
93111

94112
<!-- read time -->
@@ -100,57 +118,74 @@ <h1 data-toc-skip>{{ page.title }}</h1>
100118

101119
{% if enable_toc %}
102120
<div id="toc-bar" class="d-flex align-items-center justify-content-between invisible">
103-
<span class="label text-truncate">{{ page.title }}</span>
104-
<button type="button" class="toc-trigger btn me-1">
105-
<i class="fa-solid fa-list-ul fa-fw"></i>
106-
</button>
107-
</div>
121+
<span class="label text-truncate">{{ page.title }}</span>
122+
<button type="button" class="toc-trigger btn me-1">
123+
<i class="fa-solid fa-list-ul fa-fw"></i>
124+
</button>
125+
</div>
108126

109127
<button id="toc-solo-trigger" type="button" class="toc-trigger btn btn-outline-secondary btn-sm">
110128
<span class="label ps-2 pe-1">{{- site.data.locales[lang].panel.toc -}}</span>
111-
<i class="fa-solid fa-angle-right fa-fw"></i>
112-
</button>
129+
<i class="fa-solid fa-angle-right fa-fw"></i>
130+
</button>
113131

114-
<dialog id="toc-popup" class="p-0">
132+
<dialog id="toc-popup" class="p-0">
115133
<div class="header d-flex flex-row align-items-center justify-content-between">
116-
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
134+
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
117135
<button id="toc-popup-close" type="button" class="btn mx-1 my-1 opacity-75">
118-
<i class="fas fa-close"></i>
119-
</button>
120-
</div>
121-
<div id="toc-popup-content" class="px-4 py-3 pb-4"></div>
122-
</dialog>
136+
<i class="fas fa-close"></i>
137+
</button>
138+
</div>
139+
<div id="toc-popup-content" class="px-4 py-3 pb-4"></div>
140+
</dialog>
123141
{% endif %}
124142

125143
<div class="content">
126144
{{ content }}
145+
<!-- Google Adsense : Post Footer -->
146+
<script
147+
async
148+
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7625462844991697"
149+
crossorigin="anonymous"
150+
></script>
151+
<ins
152+
class="adsbygoogle"
153+
style="display: block"
154+
data-ad-client="ca-pub-7625462844991697"
155+
data-ad-slot="4449114570"
156+
data-ad-format="auto"
157+
data-full-width-responsive="true"
158+
></ins>
159+
<script>
160+
(adsbygoogle = window.adsbygoogle || []).push({});
161+
</script>
127162
</div>
128163

129164
<div class="post-tail-wrapper text-muted">
130165
<!-- categories -->
131166
{% if page.categories.size > 0 %}
132-
<div class="post-meta mb-3">
133-
<i class="far fa-folder-open fa-fw me-1"></i>
134-
{% for category in page.categories %}
167+
<div class="post-meta mb-3">
168+
<i class="far fa-folder-open fa-fw me-1"></i>
169+
{% for category in page.categories %}
135170
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
136171
{%- unless forloop.last -%},{%- endunless -%}
137172
{% endfor %}
138-
</div>
173+
</div>
139174
{% endif %}
140175

141176
<!-- tags -->
142177
{% if page.tags.size > 0 %}
143-
<div class="post-tags">
144-
<i class="fa fa-tags fa-fw me-1"></i>
145-
{% for tag in page.tags %}
146-
<a
147-
href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
148-
class="post-tag no-text-decoration"
149-
>
150-
{{- tag -}}
151-
</a>
152-
{% endfor %}
153-
</div>
178+
<div class="post-tags">
179+
<i class="fa fa-tags fa-fw me-1"></i>
180+
{% for tag in page.tags %}
181+
<a
182+
href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
183+
class="post-tag no-text-decoration"
184+
>
185+
{{- tag -}}
186+
</a>
187+
{% endfor %}
188+
</div>
154189
{% endif %}
155190

156191
<div

0 commit comments

Comments
 (0)