2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Hexo】Hexo环境下设置Google Adsense

Posted at

新建Adsense用模板

themes/xxxx/layout/_custom_ad/google_adsense.ejs

将Google Adsense的代码复制到google_adsense.ejs

编辑layout.ejs

在需要加上广告的地方加上

<!-- ad start -->
<%- partial('_custom_ad/google_adsense') %>
<!-- ad end -->

参考资料

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?