rayviljoen / grunt-sitemap Goto Github PK
View Code? Open in Web Editor NEWGrunt plugin for generating sitemaps
License: MIT License
Grunt plugin for generating sitemaps
License: MIT License
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
Need to convert coffee files to JS.
Decaffeinate output seems ok, but will require a small bit of tweaking.
Warning: Cannot read property '_' of undefined Use --force to continue.
And I've never seen anyone using a cakefile to build a grunt task lol. Why not use grunt, with grunt?
sitemap: {
dist: {
pattern: ['./dist/**/*.html', '!./dist/**/google*.html'],
siteRoot: './dist'
}
},
should be
sitemap: {
dist: {
pattern: ['**/*.html', '!**/google*.html'],
siteRoot: './dist'
}
},
Grunt sitemap isn't generating the correct urls when you set the siteRoot
to a subfolder. When using the following config for grunt-sitemap (with dist/index.html
and dist/test.html
):
sitemap {
dist: {
siteRoot: './dist',
homepage: 'http://www.example.com'
}
}
I get a sitemap.xml with double slashes after the root url:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com//</loc>
<lastmod>2014-06-24T08:48:08.000Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>http://www.example.com//test.html</loc>
<lastmod>2014-06-24T09:06:54.000Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
</urlset>
When I change siteRoot
to dist/
(as suggested in your documentation) it adds the dist folder to the site root (which is incorrect as well):
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/dist/</loc>
<lastmod>2014-06-24T08:48:08.000Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>http://www.example.com/dist/test.html</loc>
<lastmod>2014-06-24T09:06:54.000Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
</urlset>
So either grunt-sitemap suffixes two slashes, or it adds the root folder to the site url, both of which aren't correct. Any idea what's going wrong?
Originally reported here, but it's a separate issue anyway.
grunt-sitemap keeps complaining that homepage isn't found yet it is present in my package.json.
https://code.google.com/p/stexbar/source/browse/trunk/www/package.json
So after specifying the homepage property in my gruntfile.js, then everything completes.
Actually, the plugin use the file extension in the URLs.
It would be nice to have an option to remove the extension if you prefer to use clean URLs.
for example:
http://example.com/mypage.html -> http://example.com/mypagehtml
$ node -v
v0.10.25
$ grunt -V
grunt-cli v0.1.13
grunt v0.4.3
$ npm list grunt-sitemap
[email protected]
I'm on Windows so it might be due to that
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\xmr\Desktop\grunt-sitemap>node -v && npm -v
v0.10.31
1.4.23
C:\Users\xmr\Desktop\grunt-sitemap>cake build
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
Is coffeescript really needed for such a small project?
Hi, could you please increment the package version from 2.0.1 to e.g. 2.1.0 after your update regarding filename property for the generated sitemap? I am using your package through npm, and apparently it does not recognize your latest added feature due to the same version number.
Thanks in advance, this is a very useful package!
Why if i set the homepage my URL, it will add all node_modules???
Ideally, there should be some real tests for the project.
Is there a clever way to give different priorities to my pages?
Something like:
My build environment is set up using Yoeman. So in my root build directory structure I have "app" (my pre-grunt build app), "bower_components", "node_modules", "test", and "dist" (post grunt build app) then bower.json, Gruntfile.js, package.json in that root directory.
When I set the siteRoot: 'dist/' and run after I build the app. Then run "grunt sitemap" it s reads the entire root build directory and outputs everything in there to /dist. So basically its reading everything in the "app", "bower_components", "node_modules", "test", and "dist" and putting it in the sitemaps.xml when I only want it to read /dist and output the xml to /dist.
I think Im overlooking something so this may not be an issue so please inform me how I can accomplish this if I am doing something wrong. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.