What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi, does Spryker have any kind of functionality/module that would be responsible for generating site
Hi, does Spryker have any kind of functionality/module that would be responsible for generating sitemaps? Couldn't find anything so far π€
Comments
-
Nope, they don't. Just built our own solution on project level yesterday.
Poor enough that this is missing from the core.0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
It will be cool when u can share your solution or just describe it π This is also the main principle of a community?! π
0 -
Sure.
The idea is to read all urls fromspy_url
that are no redirects. Then use a package like https://packagist.org/packages/thepixeldeveloper/sitemap to create your xml out of it. All of this is done in Zed, of course.
To get it into the frontend, you'll need to create an Yves controller and a client which is reading the generated xml from Zed. Finally, the Yves controller will just return the xml response.
Does that help to get you going?I'd love to provide my solution to Spryker, but I'm not having the time to build a module and clarify whether my client allows me to do so, unfortunately. You know how it is in everyday business...
0 -
If you're not having too much data, it should be good to generate the sitemap on the fly any time somebody's asking for it.
Otherwise you might want to add some sort of custom caching to it.0 -
@UPWG9AYH2 @U01TXCBF5SS I guess we can use this for our project as well π
0 -
This solution sounds like a great approach and I also find this is an important missing feature in core. Rather than developing something for Spryker you can always suggest it as an idea or support similar suggestions, eg https://spryker.ideas.aha.io/ideas/search?utf8=%E2%9C%93&query=sitemap
0 -
I'll try to clarify with my client whether we can contribute it somehow.
FYI: Our solution (incl. some clever caching and renewal via Jenkins job) takes around 40 files. Would be happy to share and save others that bulk of work.0 -
π We also solved this on the project level and I think we are using the same library too π
Ours is fairly project specific but something more generic and shared would be useful for others.0 -
There are other packages doing more or less the same thing, but some of them are forcing you to provide a target file path as a string. It would work, too, but I'd rather like to create the xml in memory and decide myself how to store it. For consistency I'm using the Spryker filesystem service for reading and writing the sitemap file.
0 -
Thank you, @U01LKKBK97T π
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
@U01LKKBK97T does it work also for ca. 3 Mio Products, ca. 1200 Categories? Does it generate in bulk?
0 -
Remember that
spy_url
does not contain concrete urls since these are abstract urls with query params. Hence we're not printing those attributed abstract urls to the sitemap to avoid duplicate content issues.If you really have 3 Mio abstract urls, it might need some extra effort to read the urls in chunks from db and stream them to the output file to avoid out of memory issues.
Since Google has a limitation of max 50k items per sitemap file, you'd need to spread your urls across several files anyway. So 50k items should be doable without caring about memory.
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
Yes, I have ca. 3 Mio Abstract + min. 3 Mio Concrete... Your solution generate a sitemap xml file with reference to bulk xml files, right? What u placed the configuration (i hope different for every entity type) such as frequency etc..?
0 -
In your case I'd suggest to create several xml files having max. 50k items and an additional index file referencing all of them: https://developers.google.com/search/docs/advanced/sitemaps/large-sitemaps
In our case, I've set priority to 0.5 and changefreq to daily for any url. According to Google, these values aren't used anymore, so I'm just using the same defaults for anything, just in case that other search engines will use it.
https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap?hl=en0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random