Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Adding support for static and dynamic collections #33
Adding support for static and dynamic collections. (Dynamic collections can call a method to get a URL from each object in the collection - keeps things DRY)
Background - I've been using Big_sitemap for generating a sitemap dynamically, passing in collections returned by scope, and then calling a method to get the URL for that object instance. Different models have slightly different methods to call for vanity URLs (and some classes have multiple methods for different URLs).
Building a sitemap this way using blocks in the BigSitemap.generate() block was getting a bit messy so I reopened the BigSitemap class and added a couple of methods to DRY things up ........ submitting the pull request as I think other may find it useful - I'm prepared to tweak, incorporate feedback and try a second explanation in the README if it's not clear enough.
Hi @wesg, sorry for the late response - this project has taken somewhat of a backseat to massive_sitemap. I like the idea of being able to handle static collections. It might make sense to include this into the
I was trying to remove logic that required passing method names around - hence the deprecation of the