hcz-jekyll-blog icon indicating copy to clipboard operation
hcz-jekyll-blog copied to clipboard

Category listing does not make use of baseurl

Open GreatEmerald opened this issue 9 years ago • 8 comments

In http://aboutashu.com/hcz-jekyll-blog/others/2016/06/04/example-content.html if you click on the "jekyll" breadcrumb, you get redirected to http://aboutashu.com/category/jekyll instead of http://aboutashu.com/hcz-jekyll-blog/category/jekyll.

Similarly, all links in http://aboutashu.com/hcz-jekyll-blog/category/jekyll don't make use of baseurl either.

GreatEmerald avatar Jul 13 '16 13:07 GreatEmerald

Thanks for pointing this out. This is now fixed https://github.com/ashutosh2k12/hcz-jekyll-blog/commit/9d1ebbb40ed836088c5e2dbcaa7f58774df403fa

codeasashu avatar Jul 13 '16 17:07 codeasashu

Not fully fixed yet: if you look at http://aboutashu.com/hcz-jekyll-blog/category/jekyll and press "others", it still doesn't use the baseurl.

GreatEmerald avatar Jul 13 '16 17:07 GreatEmerald

Sorry, I overlooked. fixing again

codeasashu avatar Jul 13 '16 17:07 codeasashu

Fixed in https://github.com/ashutosh2k12/hcz-jekyll-blog/commit/7c657ee244dbed3660c3596d01a2e860a9214888

codeasashu avatar Jul 13 '16 18:07 codeasashu

There is still the issue with the actual links to the posts inside the category view, though.

GreatEmerald avatar Jul 13 '16 18:07 GreatEmerald

Bump. Still an issue, see for example http://aboutashu.com/hcz-jekyll-blog/category/jekyll and click on "Welcome to Jekyll!".

GreatEmerald avatar Jul 26 '16 18:07 GreatEmerald

To be specific, https://github.com/ashutosh2k12/hcz-jekyll-blog/blob/gh-pages/_layouts/posts_by_category.html#L44 needs a {{ site.url }} too.

GreatEmerald avatar Aug 11 '16 14:08 GreatEmerald

Hi Guys, as a matter of fact, I still have a little problem with this URL redirect in categories. When I working in the project in localhost, the redirect is point to my dns brunojdo.github.io..., instead of 127.0.0.1:4000/....

So, to solve this I remove the / to the 44L of posts_by_category.html and this problem with URL redirect stopped!

Old: <h4 class="list-group-item-heading"><a href="{{ site.baseurl }}/{{ post.url }}">{{ post.title }}</a></h4>

<h4 class="list-group-item-heading"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h4>

I going to do a PR for this.

brunojdo avatar Sep 14 '16 03:09 brunojdo