Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/guangmean/Niello.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguangmean <angularcorp@outlook.com>2019-01-09 06:01:21 +0300
committerguangmean <angularcorp@outlook.com>2019-01-09 06:01:21 +0300
commitd14f9e96e1b18f56777411232db645a55baeaed5 (patch)
tree049edb728ae26fad199687ca7dc6c2d869dd3d4f
parentab791178af8754d85600a5d0464afc527850d732 (diff)
Google Adsense
Add Google Adsense auth logic
-rw-r--r--README.md5
-rw-r--r--layouts/partials/head.html9
2 files changed, 12 insertions, 2 deletions
diff --git a/README.md b/README.md
index dbb2a4a..95bd449 100644
--- a/README.md
+++ b/README.md
@@ -28,14 +28,15 @@ git clone https://github.com/guangmean/Niello.git themes/Niello
This is an example config.toml file:
```toml
-baseURL = "http://example.org/"
+baseURL = "https://www.angularcorp.com/"
languageCode = "en-us"
-title = "New Hugo Theme - Diello"
+title = "Application Deveopment"
staticDir = ["static", "themes/Niello/static"]
[params]
copyright = "&#xA9; 2019 by guangmean. All Rights Reserved."
+google_ad_client = "ca-pub-******"
```
# Demo
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index f55644c..f574d84 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -9,4 +9,13 @@
<link rel="stylesheet" href="{{.Site.BaseURL | relLangURL}}css/normalize.css">
<link rel="stylesheet" href="{{.Site.BaseURL | relLangURL}}css/main.css">
<link rel="stylesheet" href="{{.Site.BaseURL | relLangURL}}css/diello.css">
+ {{ if .Site.Params.google_ad_client }}
+ <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+ <script>
+ (adsbygoogle = window.adsbygoogle || []).push({
+ google_ad_client: "{{ .Site.Params.google_ad_client }}",
+ enable_page_level_ads: true
+ });
+ </script>
+ {{ end }}
</head>