Giter Site home page Giter Site logo

jekyll / jekyll-sitemap Goto Github PK

View Code? Open in Web Editor NEW
941.0 20.0 133.0 314 KB

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site

Home Page: http://rubygems.org/gems/jekyll-sitemap

License: MIT License

Ruby 97.09% Shell 2.91%
sitemap ruby jekyll-plugin

jekyll-sitemap's Introduction

Jekyll Sitemap Generator Plugin

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site

Build Status

Usage

  1. Add gem 'jekyll-sitemap' to your site's Gemfile and run bundle
  2. Add the following to your site's _config.yml:
url: "https://example.com" # the base hostname & protocol for your site
plugins:
  - jekyll-sitemap

๐Ÿ’ก If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.

If all gem plugins have the same priority, they will be executed in the order they are required, generally. Thus, if you have other plugins which generate content and store that content in site.pages, site.posts, or site.collections, be sure to require jekyll-sitemap either after those other gems if you want the sitemap to include the generated content, or before those other gems if you don't want the sitemap to include the generated content from the gems. (Programming is hard.)

Because the sitemap is added to site.pages, you may have to modify any templates that iterate through all pages (for example, to build a menu of all of the site's content).

Note on Use with GitHub Pages Gem

The GitHub Pages gem ignores all plugins included in the Gemfile. If you only include jekyll-sitemap in the Gemfile without also including it in the _config.yml the plugin will not work. This can be confusing because the official Jekyll docs state that plugins can be included in either the Gemfile or _config.yml.

When building a site that uses the GitHub Pages gem, follow the instructions above and ensure that jekyll-sitemap is listed in the plugins array in _config.yml.

โš ๏ธ If you are using Jekyll < 3.5.0 use the gems key instead of plugins.

<lastmod> tag

The <lastmod> tag in the sitemap.xml will reflect by priority:

  1. The modified date of the file as reported by the filesystem if you have jekyll-last-modified-at plugin installed (not compatible with GitHub Pages auto building)
  2. A personalised date if you add the variable last_modified_at: with a date in the Front Matter
  3. The creation date of your post (corresponding to the post.date variable)

Exclusions

If you would like to exclude specific pages/posts from the sitemap set the sitemap flag to false in the front matter for the page/post.

sitemap: false

To exclude files from your sitemap. It can be achieved with configuration using Jekyll v3.7.2 and jekyll-sitemap v1.2.0.

Add a glob config to your _config.yml file.

defaults:
  -
    scope:
      path:            "assets/**/*.pdf"
    values:
      sitemap:         false

Override default development settings

Follow these instructions on Jekyll's documentation.

Developing locally

  • Use script/bootstrap to bootstrap your local development environment.
  • Use script/console to load a local IRB console with the Gem.

Testing

  1. script/bootstrap
  2. script/cibuild

Known Issues

  1. If the sitemap.xml doesn't generate in the _site folder, ensure _config.yml doesn't have safe: true. That prevents all plugins from working.
  2. If the sitemap.xml doesn't generate in the _site folder, ensure that you don't have a sitemap generator plugin in your _plugin folder.

Contributing

  1. Fork the project
  2. Create a descriptively named feature branch
  3. Add your feature
  4. Submit a pull request

jekyll-sitemap's People

Contributors

a-mt avatar ajmichels avatar alekseyg avatar amdmi3 avatar artlogic avatar ashmaroli avatar benbalter avatar blairanderson avatar coliff avatar davidsilvasmith avatar dirtyf avatar emmahsax avatar envygeeks avatar hayleycanderson avatar itafroma avatar jakob-stoeck avatar jamieconnolly avatar jekyllbot avatar johnpitchko avatar jveillet avatar kishanbagaria avatar msh100 avatar nickjj avatar oncleben31 avatar parkr avatar pathawks avatar sankage avatar stve avatar wikimatze avatar yous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-sitemap's Issues

undefined method 'relative_path'

after install the gem and adding it to _config.yml, jekyll build gives me the following error:

Generating... /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-sitemap-0.5.1/lib/jekyll-sitemap.rb:21:in `block in html_files': undefined method `relative_path' for #<Jekyll::StaticFile:0x007fd99bbfd4a8> (NoMethodError)
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-sitemap-0.5.1/lib/jekyll-sitemap.rb:21:in `select'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-sitemap-0.5.1/lib/jekyll-sitemap.rb:21:in `html_files'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-sitemap-0.5.1/lib/jekyll-sitemap.rb:11:in `generate'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/site.rb:227:in `block in generate'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/site.rb:226:in `each'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/site.rb:226:in `generate'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/site.rb:38:in `process'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/command.rb:18:in `process_site'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:23:in `build'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:7:in `process'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/jekyll-1.5.1/bin/jekyll:97:in `block (2 levels) in <top (required)>'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/command.rb:155:in `run'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/runner.rb:422:in `run_active_command'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/runner.rb:82:in `run!'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
    from /Users/ricefield/.rvm/gems/ruby-2.1.2/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'

Configuration options โ€“ are they planned?

Are any config options planned for this gem? I'm making a fork and adding some that I need. I wanted to know if something is already in the works or not and what the API should look like for the options.

baseurl not used making URL's wrong in sitemap

I've just used this plugin to generate a sitemap for a new blog.

In my _config.yml I have

baseurl: "/blog" 
url: "http://example.com"

And the sitemap.xml ends up been full of urls omitting /blog/

  <url>
    <loc>http://example.com/a-blog-post/</loc>

    <lastmod>2014-08-02T18:00:00+01:00</lastmod>

    <priority>0.8</priority>
  </url>

Have I missed something obvious or is this an issue?

sitemap does not include paginated index.html files

I'm using the "paginate" option in my _config.yml file with a value set to 10.

Jekyll will create the first index.html in the root folder.

It will create subsequent pages of index.html files in "page{n}" folder.

I can't get these subsequent index.html files to appear in the sitemap.

You can easily see what I mean by adding the "paginate" option in the test spec:

Jekyll.configuration({
      "source"      => source_dir,
      "destination" => dest_dir,
      "paginate" => 2,
      "url"         => "http://example.org",
      "collections" => { "my_collection" => { "output" => true },
                         "other_things"  => { "output" => false }
                       }
    })

Can anyone help with this issue please?

non-content files/pages are included in the sitemap

I have entries for both a 404 page and an atom feed in the generated sitemap for my site:

  <url>
    <loc>http://beforeitwasround.com/404.html</loc>
    <lastmod>2014-04-30T20:30:29-07:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.7</priority>
  </url>

  <url>
    <loc>http://beforeitwasround.com/atom.xml</loc>
    <lastmod>2014-04-30T20:30:29-07:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.7</priority>
  </url>

After a quick glance at the code, I don't understand how atom.xml gets included as it's pretty clear that static_files looks for files with a .html extension. The 404 on the other hand makes sense why it's there, even though it probably shouldn't be. Is there a way to exclude pages from the sitemap?

`sitemap: false` does nothing with some pages

Hi,

I am using jekyll-sitemap with mikaela.info which is mikaela.github.io and hosted on GitHub pages.

I have multiple pages that have sitemap: false, but for some reason they still appear in the sitemap.xml.

And the sitemap itself is https://mikaela.info/sitemap.xml .

I am totally lost on what could be the cause and any help would be appreciated.

Getting double forward slashes

I'm getting two forward slashes in all my URLs in my sitemap even though Jekyll generates permalinks properly everywhere else:

<url>
<loc>
http://christopher.su//2015/selenium-chromedriver-ubuntu/
</loc>
<lastmod>2015-05-29T00:00:00+00:00</lastmod>
</url>
<url>

Front Matter Flag to Exclude From Sitemap

It would be extremely valuable to have a flag in the front matter to prevent pages and posts from being included in the sitemap.

Something like:


---
sitemap: false

---

One example I have on my site is that I want to have a "style guide" page to make it easier for me to develop my site's design and CSS however I would prefer that this page not get included in the index.

Perhaps this is already support but just not documented.

URL encoded permalinks in posts cause incorrect sitemap

I migrated my blog from WordPress to Jekyll.
Posts exported from WordPress have URL encoded permalinks. I don't know whether the permalink should be encoded in post, but it does work well except sitemap. The generated sitemap will have the encoded URL encoded again.
Whether it's possible to solve this problem without updating all permalinks in posts?

Document compatibility with jekyll-last-modified-at

Hi,

it seems that lastmod does not reflect the changes in a file anymore.
Instead, it always stays constant.

Example:
https://flambda.de/sitemap.xml
Look for:

<url><loc>https://flambda.de/2013/08/25/pendel-time-calculations/</loc><lastmod>2013-08-25T21:40:00+02:00</lastmod></url>

The page has been updated multiple times since 2013, still, lastmod has the same value as the date field in the yaml of the post. (21:40 is specified in the yaml).

With best regards,

Excluding certain collections or pages?

I have a site with a "secret" collection. It's not quite life threatening confidential material, but stuff I have blocked via robots.txt. Is there any way to exclude pages from the sitemap?

Invalid date for static HTML document

I added the sitemap.xml to the Google Webmaster Tools and this lists the following error:

Issue: Invalid date
Description: An invalid date was found. Please fix the date or formatting before resubmitting.
Value: 2014-05-10T09:38:1399707507Z

Related part from the file:

<url>
    <loc>http://kleinfreund.de/static/tttu.html</loc>
    <lastmod>2014-05-10T09:38:1399707507Z</lastmod>
    <priority>0.6</priority>
</url>

This is a HTML document unrelated to the Jekyll site. I'd prefer to exclude it anyway.

HTTPS sitemap

Is it possible to configure the plugin to generate only https links in the sitemap.xml file?

Option to disable/omit lastmod

When generating html_pages, the lastmod doesn't quite make sense. Sure, the page was just regenerated, but doesn't mean the content changed.

We'd love an option to omit the lastmod tag when generating a sitemap.

Thanks!

No such file or directory @ rb_sysopen since upgrade to Jekyll 2.5.0

Since upgrading to Jekyll 2.5.0, Iโ€™m now getting the following error on build:

Error reading file /Users/paulrobertlloyd/.rvm/gems/ruby-2.1.4/gems/jekyll-sitemap-0.6.1/lib/sitemap.xml: No such file or directory @ rb_sysopen - /Users/paulrobertlloyd/Sites/paulrobertlloyd.com/source/Users/paulrobertlloyd/.rvm/gems/ruby-2.1.4/gems/jekyll-sitemap-0.6.1/lib/sitemap.xml 

Regardless of this error, sitemap.xml still appears to be generated correctly.

(It seems the path to the Gem and the path to the source directory are getting combined somehow). I also updated the way I require gems, to use the :jekyll_plugins group, but reverting this change makes no difference. Is this a bug introduced in Jekyll 2.5, or have I done something wrong?

404.html appearing in sitemap.xml

I have a 404.html file in my root. When I view the contents of sitemap.xml, I see:

...
<url>
<loc>https://example.com/404.html</loc>
</url>
...

Should this page be excluded from the sitemap?

Constatly get the same error - "... you don't have jekyll-sitemap or one of its dependencies installed."

Hi - I'm not sure why and it's probably due to my configuration. I use gulp for jekyll and most times when I come back to a project after a few days I keep getting the same error : "Dependency Error: Yikes! It looks like you don't have jekyll-sitemap or one of its dependencies installed."

To temporarily fix the error I just use "bundle update".

I get the same error on another project with the same setup. At the moment I use a customized version of https://github.com/shakyShane/jekyll-gulp-sass-browser-sync for jekyll/gulp combination.

Maybe is something simple I'm missing.

Thanks for any help.

The whole error message is:
Configuration file: /Users/me/Sites/website/_config.yml Dependency Error: Yikes! It looks like you don't have jekyll-sitemap or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-sitemap' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! jekyll 3.1.3 | Error: jekyll-sitemap

Sitemap generation conflicts with Jekyll configuration defaults

The following setting in the _config.yml leads to the sitemap.xml being treated as a page or post and gets layout: "default".

Therefor the content of the sitemap file is wrapped into default.html layout.

_config.yml

defaults:
  -
    scope:
      path: "" # all files have the `default` layout
    values:
      layout: "default"

(Apologies if this isn't a jekyll-sitemap issue, but a jekyll issue. I'm not sure.)

sitemap.xml URL's generating incorrectly with '//' in path

I have read the closed issues relating to url and baseurl in _config.yml and suspect this is related however can't find a solution.

In _config.yml I have:

url:              http://www.jonbartlett.org
baseurl:          '/'

When the sitemap.xml is generated the urls are generated with a double slash in the path:

<url>
<loc>http://www.jonbartlett.org//</loc>
</url>
<url>
<loc>http://www.jonbartlett.org//notes/</loc>
</url>
</urlset>

When I set baseurl to null the sitemap.xml is generated correctly. However the template I am using Poole needs baseurl: '/' as this is used to reference the root/home.

Now I could change the template. But just to confirm that there is a dependency on baseurl being null when running from the root of a custom domain?

Option to not build locally?

See jekyll/jekyll#3204 (comment) for rationale. Basically, I wouldn't really care or want a sitemap.xml locally, only on a production build. We can do this in one of a few ways:

  • Check the JEKYLL_ENV variable. If it's not production, don't build. This is the least flexible option, since it wouldn't build locally unless you explicitly tell it to. It might look like it's broken locally.
  • Add a config var. This should likely be built off of #21. (I'm not sure why that PR stalled.)
  • Something else?

Alternatively, we could not do this, and just have _config_dev.yml (or whatever) simply not include the plugin.

Duplicate entry for root site

When there's an index.html, we see that twice:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>http://example.org/</loc>
    <lastmod>2014-03-04T23:25:29-05:00</lastmod>
    <priority>1.0</priority>
  </url>

  <!-- the posts -->

  <url>
    <loc>http://example.org/</loc>
    <lastmod>2014-03-04T23:25:29-05:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.7</priority>
  </url>

  <!-- other pages, then the static HTML files -->

</urlset>

How would you like to handle this? Omit the index.html page?

Exclude a hidden folder from sitemap

Hi there,

I have a hidden folder node-v4.1.0-darwin-x64 in my site directory. And when the sitemap is generated it includes html files from this folder. Is there any way to exclude a whole folder from the sitemap?

Disable changefreq for html_pages

I'd love an option to omit the changefreq tag when generating html_pages.

changefreq is optional, and weekly is too aggressive.

A configuration option is fine.

Thanks!

generating collections in sitemap 3 beta

It appears that the sitemap plugin isn't generating entries contained within collections folders with the new beta releases. When running a jekyll clean then a jekyll build the first file within the _site folder is the sitemap.xml with blog post and pages outside of the collection directories.

Jekyll version: jekyll-3.0.0.pre.beta8
Jekyll version: 0.8.1

Configuration _config.yml:

collections:
  groovy-examples:
    output: true

  java-examples:
    output: true

  java-exercises:
    output: true

  java-tutorials:
    output: true

gems:
  - jekyll-paginate
  - jekyll-gist 
  - jekyll-sitemap

I verified when switching back to jekyll-2.5.3 it is working, is there something I am missing in the configuration? I don't have mad ruby skills but willing to debug with direction. Thanks

Exclude certain html files from sitemap

I have no solution for this, so I am leaving this is a feature request for now so that someone/I can pick it up when they have time.

There are some instances where you may want to have an html file in a specific part of your site but you may not want it to be in the sitemap.

An example of this is the Google Webmaster Tools verification file which consists google followed of a number of random hex digits with the html extension. I am sure there are other instances where one may need a file for verification purposes too.

0.6.2 errors on Windows

For giggles I was doing some Windows testing and updated to the new Jekyll Sitemap gem.

C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary.rb:20:in `
program': cannot load such file -- mercenary/program (LoadError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.5.1/bin/jekyll:20:
in `<top (required)>'
        from C:/Ruby200-x64/bin/jekyll:23:in `load'
        from C:/Ruby200-x64/bin/jekyll:23:in `<main>'

Not sure if the problem is similar to what was going on with 2.5 but to get Jekyll to run properly I had to roll back from 2.5.1 to 2.4.0 and jekyll-sitemap to 0.6.1

Post-type URLs are duplicated in generated sitemap.xml

There is a high likelihood this might be user error, but it appears that URLs for _posts items are being duplicated in the generated sitemap; one with a <lastmod> node, and one without for each post. This occured with the currently generated sitemap via Github Pages (see http://rodaine.com/sitemap.xml) and can also be reproduced locally with the current versions of everything using the github-pages gem:

โ†’ be github-pages versions
+---------------------------+---------+
| Gem                       | Version |
+---------------------------+---------+
| jekyll                    | 3.0.2   |
| jekyll-sass-converter     | 1.3.0   |
| jekyll-textile-converter  | 0.1.0   |
| kramdown                  | 1.9.0   |
| rdiscount                 | 2.1.8   |
| redcarpet                 | 3.3.3   |
| RedCloth                  | 4.2.9   |
| liquid                    | 3.0.6   |
| rouge                     | 1.10.1  |
| jemoji                    | 0.5.1   |
| jekyll-mentions           | 1.0.0   |
| jekyll-redirect-from      | 0.9.1   |
| jekyll-sitemap            | 0.9.0   |
| jekyll-feed               | 0.3.1   |
| jekyll-gist               | 1.4.0   |
| jekyll-paginate           | 1.1.0   |
| github-pages-health-check | 0.6.0   |
| jekyll-coffeescript       | 1.0.1   |
| jekyll-seo-tag            | 0.1.4   |
+---------------------------+---------+

The resulting XML is:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>http://rodaine.com/2015/04/async-split-io-reader-in-golang/</loc>
    <lastmod>2015-04-25T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/2013/10/develop-locally-with-wordpress/</loc>
    <lastmod>2013-10-14T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/2013/09/add-a-custom-wordpress-admin-contextual-help-menu-to-your-plugin-or-theme/</loc>
    <lastmod>2013-09-25T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/2013/09/experimenting-with-canvas-and-requestanimationframe/</loc>
    <lastmod>2013-09-17T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/2013/09/how-to-report-a-bug-to-a-web-developer/</loc>
    <lastmod>2013-09-10T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/2013/07/untangle-html-and-javascript-using-dependency-injection/</loc>
    <lastmod>2013-07-16T00:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>http://rodaine.com/projects/</loc>
  </url>
  <url>
    <loc>http://rodaine.com/archive/</loc>
  </url>
  <url>
    <loc>http://rodaine.com/</loc>
  </url>
  <url>
    <loc>http://rodaine.com/chris-roche/</loc>
  </url>
    <url>
      <loc>http://rodaine.com/2013/07/untangle-html-and-javascript-using-dependency-injection/</loc>
    </url>
    <url>
      <loc>http://rodaine.com/2013/09/how-to-report-a-bug-to-a-web-developer/</loc>
    </url>
    <url>
      <loc>http://rodaine.com/2013/09/experimenting-with-canvas-and-requestanimationframe/</loc>
    </url>
    <url>
      <loc>http://rodaine.com/2013/09/add-a-custom-wordpress-admin-contextual-help-menu-to-your-plugin-or-theme/</loc>
    </url>
    <url>
      <loc>http://rodaine.com/2013/10/develop-locally-with-wordpress/</loc>
    </url>
    <url>
      <loc>http://rodaine.com/2015/04/async-split-io-reader-in-golang/</loc>
    </url>
</urlset>

Not sure if I missed something or there's a bug. Can look in deeper, but hoping someone might have some insight. Thanks!

No support for scheme-agnostic base url

Specifying url: //domainname works for generating a scheme-agnostic web site, one which is hosted at both http://domainname and https://domainname. However, the sitemap.xml which is generated by jekyll-sitemap will have URLs of the form //domainname/etc with no scheme.

Can we make jekyll-sitemap detect if the site.url starts with //, and if so, prepend https:?

Append baseUrl to url

I believe the sitemap build script should use both url + baseurl from the _config file to create the path. All of my urls were incorrect as the script seems to only use config.url

Duplicates generated with Jekyll 3 and jekyll-sitemap 0.9.0

Was doing some testing with Jekyll 3.0.1 locally and noticed a small bug with the sitemap.xml being generated is creating duplicates across the board. Not sure if Jekyll 3 is to blame or not.

With Jekyll 2.5.3 and jekyll-sitemap 0.9 I didn't notice the duplicates. For reference here's a sitemap.xml generated with 2.5.3 and the same file with Jekyll 3.0.1

If you check the first entry you'll notice it shows up again at the end of the file but without lastmod. Seems to happen for all documents.

<url>
    <loc>http://localhost:4000/procreate-paintings/molly-m-portrait/</loc>
    <lastmod>2015-12-07T00:00:00-05:00</lastmod>
</url>
<url>
      <loc>http://localhost:4000/procreate-paintings/molly-m-portrait/</loc>
</url>

Sitemap does not properly ignore ignored files

Steps to reproduce:

  1. Create a Jekyll site with HTML files in a directory
  2. Exclude that directory via _config.yml

Expected:

HTML files excluded from sitemap

Actual:

HTML files included in sitemap

Change the name of normalize_url and globalize it.

The way Jekyll Sitemap does URL's makes it hard for people to customize the URL to make sure it's consistent and that Google and Yahoo get the right information. If you rename your filter and globalize it then it becomes easier for people override that inside of their own filters without them having to bind in multiple places.

We would love to use this plugin on our sites but this feature is blocking us, we output as "page.html" and route through high-throughput proxies as "/page" and would like to adjust this plugin to respect that. Right now we can do that, by again binding our normalize_url into SitemapFilters but with a global filter we don't need the bind, just the patch to the global filters.

Homepage URL using a trailing slash

The homepage URL in my generated sitemap.xml seems to be using a trailingslash. Here's an example:

<url>
    <loc>https://example.com/</loc>
</url>

In _config.yml, I'm setting the url like this:

url: https://example.com

Should sitemap.xml honour this config setting with reference to my homepage URL?

Please note that pages are listed in sitemap.xml as expected (no trailing slash). For example:

<url>
    <loc>https://example.com/about</loc>
</url>

Add `generator` property

How about adding something like <generator>Jekyll v2.1.0 / Sitemap plugin v0.4.1</generator>?

Personally, I add this field myself since I haven't switched everything to use the plugin, but I do plan to make use of the plugin eventually in my projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.