Add hexo-autonofollow

hexo-autonofollow also adds target="_blank"
This commit is contained in:
curben 2018-09-23 15:54:51 +09:30
parent af69c9a40b
commit 666d99def0
4 changed files with 8 additions and 2 deletions

View File

@ -65,6 +65,11 @@ pagination_dir: page
## Themes: https://hexo.io/themes/ ## Themes: https://hexo.io/themes/
theme: typing theme: typing
# hexo-autonofollow
## https://github.com/liuzc/hexo-autonofollow
nofollow:
enable: true
# Deployment # Deployment
## Docs: https://hexo.io/docs/deployment.html ## Docs: https://hexo.io/docs/deployment.html
deploy: deploy:

View File

@ -7,6 +7,7 @@
}, },
"dependencies": { "dependencies": {
"hexo": "latest", "hexo": "latest",
"hexo-autonofollow": "latest",
"hexo-generator-archive": "latest", "hexo-generator-archive": "latest",
"hexo-generator-category": "latest", "hexo-generator-category": "latest",
"hexo-generator-index": "latest", "hexo-generator-index": "latest",

View File

@ -10,6 +10,6 @@
<hr> <hr>
<% } %> <% } %>
<div id="copyright" class="copyright"> <div id="copyright" class="copyright">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author %>. <%= __('powered_by') %> <%- link_to('https://hexo.io/', 'Hexo', {external: true}) %> with <%- link_to('https://github.com/geekplux/hexo-theme-typing', 'Typing', {external: true}) %> theme. <br>Content is licensed under <%- link_to('https://creativecommons.org/licenses/by-sa/4.0/', 'CC-BY-SA 4.0', {external: true}) %>. &copy; <%= date(new Date(), 'YYYY') %> <%= config.author %>. <%= __('powered_by') %> <%- link_to('https://hexo.io/', 'Hexo') %> with <%- link_to('https://github.com/geekplux/hexo-theme-typing', 'Typing') %> theme. <br>Content is licensed under <%- link_to('https://creativecommons.org/licenses/by-sa/4.0/', 'CC-BY-SA 4.0') %>.
</div> </div>
</footer> </footer>

View File

@ -1,6 +1,6 @@
<% if (post.link){ %> <% if (post.link){ %>
<h1 itemprop="name"> <h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a> <a class="<%= class_name %>" href="<%- url_for(post.link) %>" itemprop="url"><%= post.title %></a>
</h1> </h1>
<% } else if (post.title){ %> <% } else if (post.title){ %>
<% if (index){ %> <% if (index){ %>