mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-06 12:04:00 +09:00
0571d2d50efc8bdaee112bce32e683dd3b6f0ea9
## Description ref #3308 Ability to render Pages with document type equal to `xml` If page with document type xml is created and has path `/sitemap.xml` this page is rendered as sitemap otherwise implicit sitemap.xml is generated. On publish we use following logic for rendering. With doctype === xml - we are rendering XmlNode as is - `Body` rendered as `(props) => props.children`, - all other elements as `() => null` - [x] - sitemap.xml must be excluded from sitemap ## Steps for reproduction ### Example Saas Sitemap with $resource and custom section and headers mixed with XmlNode - App builder https://xml-gen.staging.webstudio.is/builder/d6bcc915-6634-4e2d-9ef1-90e8e3836003?pageId=KrgWBi6ANVxH2BfRbar19 - Published https://saas-sitemapxml-x1g2n.wstd.work/sitemap.xml ### Implicit sitemap - App builder https://xml-gen.staging.webstudio.is/builder/96168940-4fbd-454a-9a03-ba4f2dffbbec - Published https://saas-january-th6m1.wstd.work/sitemap.xml Example with custom section and non XmlNode elements <img width="784" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/47520bf8-bb77-4c0f-b44d-011cf2cf9814"> ### Example Saas without explicit sitemap ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory --------- Co-authored-by: Oleg Isonen <oleg008@gmail.com>
Learning Resources
- Blog
- Documentation
- Brand and Product Design
- Contributing Guide for Devs
- Github Discussions
- Wishlist
- Builder Issues Tracker
- Roadmap
Social Media
Thanks
Thanks to Lost Pixel for providing the visual testing platform that helps us review UI changes and catch visual regressions.
Languages
TypeScript
98.9%
PLpgSQL
0.5%
CSS
0.3%
Shell
0.2%
JavaScript
0.1%
