Comments (8)
I'll take that in consideration!
from strapi-plugin-sitemap.
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.
@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.
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.
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.
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.
Yes you are right this setup is overwritten and works as expected. Thank you
from strapi-plugin-sitemap.
Great! I'll close this issue then.
from strapi-plugin-sitemap.
Related Issues (20)
- Support excluding sites by condition HOT 2
- how to exclude a specific url for sitemap HOT 9
- Allow URL translation sets for custom URLs HOT 2
- How to combine multiple content-types? HOT 2
- Server.js configuration for the sitemap plugin HOT 12
- Error when generating sitemap on Strapi 4.14.4 and Node v18 HOT 2
- Multiple hostnames/host profiles HOT 1
- Critical dependency: the request of a dependency is an expression HOT 5
- Allow relational fields be declared in url patern recursively HOT 3
- Bug: excludedTypes config setting doesn't seem to work HOT 5
- Bug: missing settings labels HOT 5
- Make the <xhtml:link> element in XML optional HOT 1
- feature request: pretty print option HOT 6
- Sitemap Breaks When Exceeding Limit and Strapi Port Differs from Default HOT 4
- Add an additional link tag with hreflang x-default to improve locale detection fallback HOT 5
- Does not work with ADMIN_PATH and STRAPI_ADMIN_BACKEND_URL HOT 1
- Add extension points / hooks. HOT 1
- [FEAT] Ignore all content types but the created by content type builder, i.e., api content types
- Error building SitemapStream in Strapi Sitemap Plugin after removing locale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-plugin-sitemap.