Giter Site home page Giter Site logo

Comments (4)

kjvarga avatar kjvarga commented on July 16, 2024

Are you running the latest version?

The host that appears in your sitemaps will be whatever you set
SitemapGenerator::Sitemap.default_host to. You can paste your config in here if you want me to take a look.

from sitemap_generator.

geoffw8 avatar geoffw8 commented on July 16, 2024

Hey - I'm massone, thats my work account, forgot to log out :)

Thanks for getting back to me, here's my config:

SitemapGenerator::Sitemap.default_host = "http://www.weartolook.com"
SitemapGenerator::Sitemap.sitemaps_host = "http://s3.amazonaws.com/wtlimg/"
SitemapGenerator::Sitemap.public_path = 'tmp/'
SitemapGenerator::Sitemap.sitemaps_path = 'sitemaps/'
SitemapGenerator::Sitemap.adapter = SitemapGenerator::WaveAdapter.new
SitemapGenerator::Sitemap.create do
Product.find_each do |product|
add product_path(product), :lastmod => product.updated_at
end
end

Not sure how to work out my version??

Thanks very much in advance, this has been driving me crazy!!

Cheers!

Geoff

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

Hi Geoff,

Your sitemap looks good. I think perhaps the issue is something simple that you have overlooked. It's is very very unlikely that the host will be localhost:3000 in the generated sitemap, because you are using the path helper (product_path) and have set your default_host.

You are looking at the sitemaps in tmp/ right? Perhaps you have some old one in public/sitemaps. You are generating into tmp/sitemaps/. The files in there will be uploaded to your S3 bin or whatever you are using.

Incidentally where are these being uploaded to?

To make sure you are using the latest version of the gem, check gem list sitemap_generator. Make sure it's the latest v2.1.5. Best is to use a Gemfile in your project, then you can fix the version.

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

I tried your config minus the WaveAdapter line and changed your Product to a model of my own. The sitemaps look good, links are as expected.

from sitemap_generator.

Related Issues (20)

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.