Uh oh!
There was an error while loading. Please reload this page.
jekyll: fix sitemap lastmod - #15267
Conversation
Uh oh!
There was an error while loading. Please reload this page.
✅ Deploy Preview for docsdocker ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
crazy-max
commented
Jul 29, 2022
@thaJeztah@usha-mandya This PR would make search engines happy 🙂 |
Uh oh!
There was an error while loading. Please reload this page.
7c48d16 to
a308fcdCompare@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
7bba3a3Compareusha-mandya
commented
Sep 6, 2022
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
38709b0Compare✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
38709b0 to
3d0858cCompareMade 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
6618615Comparedvdksn
commented
Oct 26, 2022
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| |
crazy-max
commented
Oct 26, 2022
Ah good point yes we don't need the history anyway, will make this change 👍 |
6618615 to
ab80cc1Compareab80cc1 to
9f82f5eCompareSigned-off-by: CrazyMax <crazy-max@users.noreply.github.com>
9f82f5e to
a16eff5Compare
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