Expand prerender crawling to improve DX
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
Some common routes are not considered during crawling for pre-rendering, leading to avoidable errors for developers that they need to manually resolve by updating their svelte.config.js entries array.
Reducing these errors would smooth the developer experience and help things "just work", for more common scenarios.
Describe the proposed solution
If(Update: this one is good and crawled already.)link[rel=alternate]exists with the page HTML, include thishrefas a route to potentially prerender (e.g.<link rel="alternate" href="/blog/atom.xml" type="application/atom+xml" />).- If
/robots.txtexists during the crawl, split lines and get the URL from:Sitemap: https://example.com/sitemap.xml. A valid sitemap line robots.txt will always use this exact format ofSite: <fully qualified URL>. 1.) prerender the sitemap path itself if marked for prerendering, 2.) parsesitemap.xmlurls to evaluate for prerendering. (/robots.txtitself is already prerendered even without updatingsvelte.config.js.)
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://example.com/contact</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
</urlset>
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the prerender crawl behavior described in the issue, then inspect how svelte.config.js entries, /robots.txt, and sitemap.xml are handled. Done means sitemap URLs discovered through a valid robots.txt Sitemap line are evaluated for prerendering, with the sitemap path itself handled as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- developer-experience, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100