Coder Social home page Coder Social logo

Comments (8)

boazpoolman avatar boazpoolman commented on May 20, 2024 1

I'll take that in consideration!

from strapi-plugin-sitemap.

boazpoolman avatar boazpoolman commented on May 20, 2024

So, I'm seeing two topics here.

You have an issue with duplicate forward slashes.
Weirdly enough, because there is code in place to remove those, see: https://github.com/boazpoolman/strapi-plugin-sitemap/blob/master/server/services/pattern.js#L140C79-L140C79
If you can write up a new issue about that with proper steps to reproduce I can take a look at that.

For the prefix_except_default feature. You should allready be able to do this, but with a slightly different strategy.
You can create different patterns for different locales.

So the EN pattern would be /blog/[id]
And then you would have another pattern for ES, which would be /[locale]/blog/[id]. Or even /es/blog/[id] should do.

Does that work for you?

from strapi-plugin-sitemap.

reslear avatar reslear commented on May 20, 2024

@boazpoolman thx for answering, so...

You have an issue with duplicate forward slashes. Weirdly enough, because there is code in place to remove those, see: https://github.com/boazpoolman/strapi-plugin-sitemap/blob/master/server/services/pattern.js#L140C79-L140C79 If you can write up a new issue about that with proper steps to reproduce I can take a look at that.

Well, it is still to come to this (if the option to make locale empty by default is developed), because by default locale cannot be `` empty. By the way, this is an idea.

So the EN pattern would be /blog/[id] And then you would have another pattern for ES, which would be /[locale]/blog/[id]. Or even /es/blog/[id] should do.

Yes I thought about that, but when ~20 languages is it worth it to manually do it for each one separately? if there was an exception option.

from strapi-plugin-sitemap.

boazpoolman avatar boazpoolman commented on May 20, 2024

About the double slashes; I'm still not quite sure how this is happening.
Please create another issue and follow the issue template, providing me with steps to reproduce.

About this issue (#158), in the case of 20 languages you could just make one generic URL pattern, and create a single one for a specific language. That second pattern will then override the generic one.

from strapi-plugin-sitemap.

reslear avatar reslear commented on May 20, 2024

No concerns about the double slashes; originally, I anticipated a potential issue down the road, especially if there were plans to develop an empty default language. However, the code already addresses this scenario.

To streamline, might want to contemplate incorporating a boolean setting such as "replace default language with empty value."

from strapi-plugin-sitemap.

reslear avatar reslear commented on May 20, 2024

About this issue (#158), in the case of 20 languages you could just make one generic URL pattern, and create a single one for a specific language. That second pattern will then override the generic one.

ok, and I'll try this, as it looks like a potentially working workaround

from strapi-plugin-sitemap.

reslear avatar reslear commented on May 20, 2024

Yes you are right this setup is overwritten and works as expected. Thank you

Screenshot 2024-01-27 at 06 39 27

from strapi-plugin-sitemap.

boazpoolman avatar boazpoolman commented on May 20, 2024

Great! I'll close this issue then.

from strapi-plugin-sitemap.

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.