在next模版的站点中添加goole AdSense
- 注册 Goole AdSense
- 复制google Adsense提供的js代码,在Next主题目录下的
layout/_custom/head.swig
中添加:1
2
3
4
5
6
7<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-xxx",
enable_page_level_ads: true
});
</script>
相关文章