diff options
author | Byonggon Lee <gonny952@gmail.com> | 2018-12-02 10:36:03 +0300 |
---|---|---|
committer | Byonggon Lee <gonny952@gmail.com> | 2018-12-02 10:36:03 +0300 |
commit | 7998fc8dd59c6187fdd41377eaa8fb8672da30f5 (patch) | |
tree | f1f248470e65f5137944a345880b4bd12b176394 | |
parent | a77cba4d8714449d7e53eba3e47b92a945a2f6be (diff) |
Support Google Adsense Auto Adsv1.1.0
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 9 | ||||
-rw-r--r-- | theme.toml | 4 |
4 files changed, 13 insertions, 2 deletions
@@ -53,6 +53,7 @@ if you post index.html without removing html, head body tags you can achieve thi - googleAnalytics(string): google analytics tracking id - title(string): title of your site - copyright(string): copyright of your site +- [params]googleAutoAds(string): google_ad_client value of Google Auto Ads - [params]avatar(string): avatar image url of index page of your site - [params]author(string): your name at index page - [params]info(string): info string below your name at index page diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2edfe47..ed487eb 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,6 +7,7 @@ title = "Your site title" copyright = "" [params] + googleAutoAds = "" avatar = "https://openclipart.org/download/103855/tux.svg" author = "Your name" info = "Any info about you" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 23bee5b..f4fab71 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,6 +9,15 @@ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css"/> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script> {{ template "_internal/opengraph.html" . }} + {{- if not (eq .Site.Params.googleAutoAds "") -}} + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> + <script> + (adsbygoogle = window.adsbygoogle || []).push({ + google_ad_client: "{{ .Site.Params.googleAutoAds }}", + enable_page_level_ads: true + }); + </script> + {{- end -}} </head> <body> <header class="apps-header"> @@ -4,9 +4,9 @@ name = "hugo-apps-theme" license = "MIT" licenselink = "https://github.com/gonapps/hugo-apps-theme/LICENSE.md" -description = "This theme makes it easy to post your webapps" +description = "A theme that makes it easy to post your webapps" homepage = "http://gonapps.com" -tags = ["minimal", "highlight.js", "customizable", "projects", "portfolio", "google analytics", "syntax highlighting", "light"] +tags = ["minimal", "highlight.js", "customizable", "projects", "portfolio", "google analytics", "syntax highlighting", "light", "google adsense"] features = [] min_version = "0.41" |