-
Notifications
You must be signed in to change notification settings - Fork 312
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
Suggested updates to tumblr.rb for better metadata preservation, and SEO. #54
Conversation
…anonical" HREF pointer for SEO in generated Tumblr pointer files. Also added "noindex,follow" tag for robots.
…option, but doesn't hurt and good for future redirect efforts.
Tumblr doesn't discriminate by "slug" text. While it's not possible at the current time to do rule-based redirects on some hosts (such as GitHub Pages) ... this will at least prevent search-engines from stacking up a bunch of 404's checking that directory. Unfortunately, there is still no way for hosts like GitHub Pages to do "catch-all" slug text, unlike Tumblr. So, people with messed up links to your blog that used to work will still return 404 unless they've simply left off the slug text.
…Search. https://productforums.google.com/d/msg/webmasters/0sqRrolO_Ss/igOdQIjwKdEJ "One reason for this is that we sometimes find a non-canonical URL first. If this URL has a noindex robots meta tag, we might decide not to index anything until we crawl and index the canonical URL. Without the noindex robots meta tag (with the rel=canonical link element) we can start by indexing that URL and show it to users in search results. As soon as we crawl the canonical URL, we can change to the canonical URL instead. It's also much safer because you don't have to worry about serving different versions of the content depending on the exact URL :-)."
Cool. Thanks! ❤️ @parkr your turn. 😃 |
@@ -121,7 +121,9 @@ def self.post_to_hash(post, format) | |||
:header => { | |||
"layout" => "post", | |||
"title" => title, | |||
"date" => DateTime.parse(post['date']).strftime('%Y-%m-%d %H:%M:%S'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the timezone here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it out since the timezone can be assigned globally in config.yml and would only matter in my opinion if the user had changed timezones over the course of their blog being in existence.
However, it wouldn't hurt I guess. — Would it just be "%Y-%m-%d %H:%M:%S %:z" ? (some countries indeed have a timezone that differs in minutes not hours ... I've been to them)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timezone
configuration option doesn't change this timezone – in fact, when it's set, this usually reverts to UTC and is output in the specified timezone. I'd suggest using a built-in method like iso8601
. We use Time.parse
to parse these datetimes in Jekyll so as long as it can be read properly there, we're all good.
LGTM other than the timezone offset! |
Do you want to pull it and make the timezone change thereafter? I'm not entirely sure why UTC wouldn't be better in this case. |
It's just always better to be explicit, I'd say. Is vagueness desired here? |
It's up to you. I'm OK with UTC. If you want to make the change to something else, pull it and do so after. |
OK. |
No description provided.