-
Notifications
You must be signed in to change notification settings - Fork 8.1k
jekyll: fix sitemap lastmod #15267
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
jekyll: fix sitemap lastmod #15267
Conversation
✅ Deploy Preview for docsdocker ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
|
@thaJeztah @usha-mandya This PR would make search engines happy 🙂 |
7c48d16 to
a308fcd
Compare
|
@thaJeztah Except your concerns with I made some comparison in our CI to see if there is a huge perf regression: Last build on master branch: https://github.com/docker/docker.github.io/runs/8111429336?check_suite_focus=true#step:4:571 This PR: https://github.com/docker/docker.github.io/runs/8116505924?check_suite_focus=true#step:4:577 It seems acceptable to me and worth the change to fix our sitemap so search engines can consume it and make relevant decision on results. We could also generate sitemap only on CI with a new env so we are not impacting developers but I think it's fine as it is atm. |
16cf0a3 to
7bba3a3
Compare
|
Thanks Kevin. @thaJeztah Does it LGTY? |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
7bba3a3 to
38709b0
Compare
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
38709b0 to
3d0858c
Compare
|
Made some changes related to #15239 (comment) so now remote resources are cached and fetched using Git so incremental builds are improved. This will speedup local builds by almost 62%: Before: Now: With this new way to fetch remote resources we are now able to set the right last modification date for remote pages too. cc @usha-mandya @dvdksn |
bdabffb to
6618615
Compare
|
The incremental builds are really fast with this 🤩 But I noticed that the first build can take a really long time. Build time on diff --git a/_plugins/fetch_remote.rb b/_plugins/fetch_remote.rb
index 4370baaccb..158fb3919a 100644
--- a/_plugins/fetch_remote.rb
+++ b/_plugins/fetch_remote.rb
@@ -55,11 +55,11 @@ module Jekyll
rescue => e
FileUtils.rm_rf(clonedir)
puts " Cloning repository into #{clonedir}"
- git = Git.clone("#{entry['repo']}.git", Pathname.new(clonedir), branch: entry['ref'])
+ git = Git.clone("#{entry['repo']}.git", Pathname.new(clonedir), branch: entry['ref'], depth: 1)
end
else
puts " Cloning repository into #{clonedir}"
- git = Git.clone("#{entry['repo']}.git", Pathname.new(clonedir), branch: entry['ref'])
+ git = Git.clone("#{entry['repo']}.git", Pathname.new(clonedir), branch: entry['ref'], depth: 1)
end
entry['paths'].each do |path| |
Ah good point yes we don't need the history anyway, will make this change 👍 |
6618615 to
ab80cc1
Compare
ab80cc1 to
9f82f5e
Compare
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
9f82f5e to
a16eff5
Compare
dvdksn
left a comment
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.
![]()
follow-up #15250 (comment)
fix sitemap last modification date not being taken into account:
it will use git and fall back to file's
mtimeif necessary.also adds following entries to sitemap exclusion list that should not be there: https://docs-stage.docker.com/sitemap.xml
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com