You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our sitemap has a urlset element, but it's now empty after upgrading to latest Jekyll and latest sitemap plugin. Jekyll 3.0.1, about a bazillion pages, zero posts. Our site builder runs Jekyll using the --source and --destination flags, and does not chdir into the source dir before running it.
Prying things open with byebug, it looks like the problem is here:
deffill_pages(site,urlset)site.pages.eachdo |page|
if !excluded?(site,page.path_to_source)ifFile.exists?(page.path)# <-- RIGHT HEREurl=fill_url(site,page)urlset.add_element(url)endendendend
The value of page.path is always something like "pe/2015.3/windows_config_mgmnt.md", and just calling File.exists? on it will only work if you've chdired into the source dir.
So I figure, instead of relying on an unreliable pwd, the generator should be prepending the value of site.source to each page.
And actually, come to think of it, why test for existence in the first place? Is there a situation where Jekyll would create and hold onto a page object without a source file?
The text was updated successfully, but these errors were encountered:
Ack, there's other places in the code that make the same assumption. Just found one when I ripped out that check: date = File.mtime(page_or_post.path).
nfagerlund
added a commit
to nfagerlund/puppet-docs
that referenced
this issue
Jan 8, 2016
The stock 3.x-compatible version of the sitemap plugin lets the site build...
but it doesn't actually generate a sitemap. The main urlset element is empty.
Filed kinnetica/jekyll-plugins#34
nfagerlund
added a commit
to nfagerlund/puppet-docs
that referenced
this issue
Jan 8, 2016
kinnetica/jekyll-plugins#34
The underlying problem here is that the sitemap generator is assuming the source
dir is the pwd, and in our case it's not. This commit hardens it up a bit, so
it'll work no matter where you ran the jekyll command from.
nfagerlund
added a commit
to nfagerlund/puppet-docs
that referenced
this issue
Jan 8, 2016
kinnetica/jekyll-plugins#34
The underlying problem here is that the sitemap generator is assuming the source
dir is the cwd, and in our case it's not. This commit hardens it up a bit, so
it'll work no matter where you ran the jekyll command from.
Our sitemap has a urlset element, but it's now empty after upgrading to latest Jekyll and latest sitemap plugin. Jekyll 3.0.1, about a bazillion pages, zero posts. Our site builder runs Jekyll using the
--source
and--destination
flags, and does not chdir into the source dir before running it.Prying things open with byebug, it looks like the problem is here:
The value of
page.path
is always something like"pe/2015.3/windows_config_mgmnt.md"
, and just callingFile.exists?
on it will only work if you've chdired into the source dir.So I figure, instead of relying on an unreliable pwd, the generator should be prepending the value of
site.source
to each page.And actually, come to think of it, why test for existence in the first place? Is there a situation where Jekyll would create and hold onto a page object without a source file?
The text was updated successfully, but these errors were encountered: