Apple の Auto Link Maker を Hexo ブログに追加してみる

前回の記事と同じ要領で、Hexo Blog のほうにも同じく Auto Link Maker を埋め込みたいと思います。
JavaScript を生成してクリップボードにコピーしておくところまでは前回と同じですので割愛します。

Hexo 側の設定

Amazon Publisher Studio のときと同じく themes/landscape/layout/_partial/footer.ejs の中に一行追加します。

vi themes/landscape/layout/_partial/footer.ejs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<footer id="footer">
<% if (theme.sidebar === 'bottom'){ %>
<%- partial('_partial/sidebar') %>
<% } %>
<div class="outer">
<div id="footer-info" class="inner">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
<%= __('powered_by') %> <a href="http://hexo.io/" target="_blank">Hexo</a>
<!-- Start of Amazon Publisher Studio Loader --> <script> window.amznpubstudioTag = "hogehoge-22"; </script> <!-- Do not modify the following code ! --> <script async="true" type="text/javascript" src="http://ps-jp.amazon-adsystem.com/domains/hogehoge-22_eb08f220-59e2-4a2d-b8d8-186be420abee.js" charset="UTF-8"></script> <!-- End of Amazon Publisher Studio Loader -->

<script type='text/javascript'>var _merchantSettings=_merchantSettings || [];_merchantSettings.push(['AT', 'hogehoge']);(function(){var autolink=document.createElement('script');autolink.type='text/javascript';autolink.async=true; autolink.src= ('https:' == document.location.protocol) ? 'https://autolinkmaker.itunes.apple.com/js/itunes_autolinkmaker.js' : 'http://autolinkmaker.itunes.apple.com/js/itunes_autolinkmaker.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(autolink, s);})();</script>


</div>
</div>
</footer>

hexo clean, hexo d -g したら完了です。

関連する記事

www.fascinatedwithtofu.com