In version 2 plugin, the code is :
1 2 3 4 5 |
|
And after change the head.html
to that, the site’s homepage will show site’s description and keywords, and post show the post’s, if the post has not, it will show no keywords but part of content as description, and the page is like the post.
Besides, categories link will show description like Category: Name -Baham's Blog
, the archive has its own description and keywords. But yesterday I found I ignore one thing, the pages with number. t means /blog/page/bumber
these pages still show the same description and keywords as site’s.
So I need to change some codes.
1 2 3 4 5 6 7 8 9 10 |
|
Release Notes
- Make pages show different description and keywords with homepage. The keywords and description will show nothing;
- Make pages show different titles with home page. The pages will show
One of the pages from -Baham's Blog
. - pages mean
/blog/page/number
Version 2 Notes
- Make every links show the description different with the homepage;(except /blog/page/number)
- Make links without description show part of content as description;
- The keywords of the links without keywords will keep space.
Original Version
PS:
- Finding the codes’ bugs really make me tired.
- You can still use version 2’s code, and just change the
robots.txt
to disallow index/blog/page/
1
|
|
The Original Link: http://baham.github.io/05_08_add-descritpion-and-keywords-for-octopress-site-plugin-v3.html
If you want to reprint it, please do under the CC BY-NC-SA 4.0