-
Notifications
You must be signed in to change notification settings - Fork 2.6k
'/' missing in canonical link in the category pages #949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I addressed this in Pull #980 if you want to see what I did. Really easy fix. |
@footedesign: It does fix the canonical link, but adds an additional The Good: <link rel="canonical" href="http://www.harimenon.com/blog/categories/blog/"> The side effects: <a class='category' href='//blog/categories/octopress/'>Octopress</a>, <a class='category' href='//blog/categories/travis-ci/'>Travis-CI</a>, <a class='category' href='//blog/categories/blog/'>blog</a>, <a class='category' href='//blog/categories/technical/'>technical</a> <footer>
<span class="categories">posted in <a class='category' href='//blog/categories/octopress/'>Octopress</a>, <a class='category' href='//blog/categories/travis-ci/'>Travis-CI</a>, <a class='category' href='//blog/categories/blog/'>blog</a>, <a class='category' href='//blog/categories/technical/'>technical</a></span>
</footer> <link href="http://www.harimenon.com//blog/categories/blog/atom.xml" rel="self"/> |
Yeah ran into this as well...this, somewhat hackish approach, seemed to work. Adds a forward slash if the page.url contains 'categories':
|
Thanks @alexkirmse. I have included this into another pull request I have open (#953) |
@alexkirmse: I have enhanced the change a little bit as could be seen here. |
site.category_dir is definitely cleaner, thanks! |
Most recent patch works for me too, thanks. |
@floydpink This included in #953? |
@parkr Yep. But that is off of Thanks |
Thank you, @parkr |
* 'master' of git://github.com/imathis/octopress: (51 commits) fixed addSidebarToggler where index and section were flip-flopped Added sass-globbing, allowing plugin stylesheets to be auto-imported from the assets/stylesheets/plugins directory Improved: config_tag plugin is much more flexible now and can be used by other plugins directly through the config_tag method added config_tag plugin for integration of configuration into templates Fixed GitHub jsonp call. Closed imathis#1118 removed Twitter configuration for timeline and follow buton which are no longer integrated Mobile nav fixed. Removed Twitter and Ender.js. Added jQuery and updated Modernizr Added .gitattributes file to keep CRLF's out of the codebase. Using data.code.to_i like a true Rubyist in plugins/gist_code.rb. Heh. imathis#438 Using data.code.to_i like a true Rubyist in plugins/gist_code.rb. Heh. imathis#438 Bump sinatra to 1.3.5 It's 2013. Hi, MIT License. Use HTML5 '&' character to connect query params in GitHub API call. imathis#1031. Use the Github API repo sorting. Fixed issue with mobile nav choosing the last option by default. Fixes imathis#950. fixed issue imathis#949 using @alexkirmse's patch Update plugins/pygments_code.rb Async load of Facebook JS Update plugins/pygments_code.rb ... Conflicts: Rakefile _config.yml
First up, thanks heaps for Octopress! Love it!
Here's my setup:
The blog (deployed here) is being published to the
/blogs
sub-directory of an existinggh-pages
branch, whose root has the main site. (As an aside, therake deploy
script has been tweaked slightly to accommodate the main site as well, to the effect that there is agit pull --rebase
from gh-pages first, and then agit push
).Running on Windows 7, with Git Bash and Ruby 1.9.3 installed via RubyInstaller.
The blog source is here.
The issue I have is that the
canonical link
url in the category pages alone, are all with the/
betweenblogs
andblog
missing.After
source\_includes\head.html
was tweaked as below (to see the variables that are in play to generate the canonical url):...here are the excerpts from:
public\blogs\blog\archives\index.html
( good )public\blogs\index.html
( good )public\blogs\blog\categories\general
( bad! )So, I see that the
page.url
not starting with a/
is what is causing thecanonical link
in the category pages to be generated incorrectly, but I do not know if this is just me alone or how I could fix this.Could someone help please?
The text was updated successfully, but these errors were encountered: