Git Product home page Git Product logo

metalsmith-sitemap's People

Contributors

1kevgriff avatar ashishsc avatar boushley avatar doodzik avatar edorsey avatar jseppi avatar nicklasmoeller avatar njbraun avatar saintedlama avatar vanillaike avatar wilsaj avatar woodyrew 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

Watchers

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

metalsmith-sitemap's Issues

What kind of input does ignoreFiles expect?

It would make sense for it to accept an array of minimatch strings, but that does not seem to be the case. So what does it accept? I couldn't find it in the documentation.

Root directory entry

Hello! Thank you for creating such a useful plugin. Here is my question: Is it a bug or a feature that metalsmith-sitemap doesn't generate entry for the root directory <loc>hostname/</loc>? I would like to add this important entry to my sitemap.xml. How can I do this?

lastmod error

according to your docs lastmod should be a Date object, however, the sitemap module https://github.com/ekalinin/sitemap.js/blob/master/lib/sitemap.js has the following code:

  // The date of last modification (YYYY-MM-DD)
  else if (conf['lastmod']) {
    // append the timezone offset so that dates are treated as local time.
    // Otherwise the Unit tests fail sometimes.
    var timezoneOffset = 'UTC-' + (new Date().getTimezoneOffset() / 60) + '00';
    timezoneOffset = timezoneOffset.replace('--', '-');
    var dt = new Date(conf['lastmod'] + ' ' + timezoneOffset);
    this.lastmod = ut.getTimestampFromDate(dt, conf['lastmodrealtime']);
}

which assumes that last modification is a string (YYYY-MM-DD). You should either update your docs or internally render the lastmod toString() in the lastmodISO field, to bypass this manipulation.

sitemap.changefreq frontmatter ingnored

I have this frontmatter at the top of my blog root page:


---
template: blog.hbs
title: Blog
meta-description: MySite Blog
sitemap.changefreq: weekly
private: false

---

And my site build chain looks like:

  .use(sitemap({
    hostname: 'http://www.mysite.com/'
  }))

and it is at the bottom of the chain, just before build. The sitemap output is:

<url>
        <loc>http://www.mysite.com/pages/about</loc>
        <lastmod>2015-06-23</lastmod>
        <changefreq>daily</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc>http://www.mysite.com/pages/blog</loc>
        <lastmod>2015-06-24</lastmod>
        <changefreq>daily</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc>http://www.mysite.com/pages/contact-us</loc>
        <lastmod>2015-06-23</lastmod>
        <changefreq>daily</changefreq>
        <priority>0.5</priority>
    </url>

I have also tried setting a default of monthly in the build options, and they all get set to monthly, with no overrides from the frontmatter

npm versions not pushed as tags to Github

I noticed that the NPM package is at v1.0.0, but there is only one tag pushed to Github which is v0.0.10. Would you be able to make tags and push those to Github so we can see differences between versions?

Add to Metalsmith.io's plugin section?

I only found this project because another person was using it on his site. I's not listed in the plugins section of metalsmith.io.

Maybe it would be a nice idea to get it listed there?

General update

Hi there, would you still update and publish this vital plugin if I create a PR modernizing it and adding a bunch of features?

  • Better JSdocs
  • replacing new Buffer with Buffer.from
  • updating dependencies
  • Add an engines.node property to package.json
  • Add an peerDependencies.metalsmith property to package.json
  • providing support for multiple sitemaps (eg, per language)

sitemap defaults are not being honored

I setup the sitemap plugin like:

.use(sitemap({
    hostname: 'http://www.myserver.com/',
    defaults: {
      changefreq: 'monthly'
    }
  }))

and also have a few files with this frontmatter:

---
template: page.hbs
title: Thank You
private: true

---

And the hostname IS being set, but changefreq is still set to 'daily', and the files with private:true are still being inserted into the sitemap.

omitIndex leaves trailing / on site root

omitIndex removes index.html by doing a chomp right. This leaves the trailing / on the URL. This may be correct for nested directories but it is odd to have a trailing / on the root of a site.

Google is failing to index one entry of the sitemap. My gut tells me it is the root page but google does not provide the insight into what page is failing.

Would be happy to write a fix if you can think of a good way to support both directories and the root site. Should it just be a hard coded check?

configurable ignore attribute

Currently, if a metalsmith attribute of "private" is set on the file, it is skipped during the sitemap build process.

This field should be configurable.

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.