ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 336 forks source link

Widgets and categories create a duplicate content #230

Closed LinaYorda closed 5 years ago

LinaYorda commented 5 years ago

Please make sure these boxes are checked before submitting your issue. Thank you!

Widgets and categories create a duplicate content for the blog page from a form https://mywebsitecom/blog/categories/Rezepte/ , https://mywebsite.com/blog/archives/2018/. Widgets and Categories are not active but still generate duplicate content. Should be use 301 as only possible solution?

ppoffice commented 5 years ago

@LinaYorda I'm sorry but what do you mean by "duplicate content"? Can you show me some examples?

LinaYorda commented 5 years ago

For a deep crawl tool(for SEO purposes) the following pages have the same duplicate content: https://mywebsite.com/blog/tags/cars/, https://mywebsite.com/blog/categories/trucks, https://mywebsite.com/blog/archives/2018/. I removed all widgets and categories(they are not active so basically they should not appear) within hexo human but still, I get them marked as duplicate. I certainly would like to set a can ref to https://mywebsite.com/blog so that the other generated URLs(from above) won't be indexed. I hope I was able to explain were my problem is.

ppoffice commented 5 years ago

@LinaYorda If you delete the layout files for widgets and categories, they shouldn't appear in the final generated HTML files. But you better execute hexo clean to make sure there are no leftovers. I don't know whether these pages you pointed out are marked as duplicated simply because they have the same list of post. If so, you can do nothing about it as this is how static site generators work. Hexo generates a lot of similar pages with different paths based on the function of the page (e.g. archive/category/tag), so you should worry about it. To tell the search engine to overlook some of the pages, you can create a robot.txt in the root directory of your site.

LinaYorda commented 5 years ago

Hi, thanks for your answer. Creating a robot.txt also creates 404s empty page error which also is not a solution to my problem. However, where is the right place for putting rel="canonical link? In the URL or Site section?

ppoffice commented 5 years ago

@LinaYorda You can take a look at this file: https://github.com/ppoffice/hexo-theme-hueman/blob/master/layout/common/head.ejs Canonical link element should go here.

LinaYorda commented 5 years ago

All done! I was able to fix it. Thanks for your answer!