Prompt to convert a Squarespace export to Next.js
This prompt asks an AI coding assistant to rebuild a WebExport copy of a Squarespace site as a Next.js App Router project. It converts each page and gallery into components, replaces form and store blocks, keeps URL paths, and writes a redirects list for any dated blog address that has to change.
Last reviewed
Key facts
- Squarespace’s own export is an XML file for importing into other platforms, not a code base.
- Classes with an sqs- prefix come from Squarespace blocks and layouts.
- Blog posts can have dates in their paths, so redirects are part of the job.
- Test status: Next.js steps tested on a real export (Next.js 16.4.6), Squarespace cleanup not yet tested.
The prompt
Paste this into your AI coding assistant with the unzipped export open, and replace the placeholders in square brackets.
You are helping me move a static export of a Squarespace site to Next.js.
CONTEXT
- ./exported-site is a WebExport download of my Squarespace site: HTML, CSS, JavaScript, fonts and images.
- Live site for comparison: [LIVE_URL]. Final domain: [DOMAIN]. Host: [HOST: Vercel, Netlify, Cloudflare Pages, Amazon S3 or Nginx].
TARGET: Next.js
- Next.js App Router project in TypeScript, one page per route in app/<route>/page.tsx, shared header and footer in app/layout.tsx.
- Assets go to public/. Load needed scripts with next/script.
- Static export: [STATIC_EXPORT: yes or no]. If yes, set output to export and keep redirects and headers in the host's files.
SQUARESPACE-SPECIFIC CLEANUP
- Classes with an sqs- prefix come from Squarespace blocks. Keep markup and classes together when you convert a block.
- Convert each gallery as one unit, markup and script together, and test it at phone width.
- Replace form, newsletter and store blocks. Link store pages to [STORE_URL].
- Search for squarespace-cdn.com and static1.squarespace.com. Download or replace each hit.
- If blog URLs contain dates, keep the same paths or list each change in REDIRECTS.md.
RULES
- Keep the design and every URL path. List path changes in REDIRECTS.md.
- Do not invent content, prices or links. Report gaps in MIGRATION_NOTES.md.
- Build after each step and ask before deleting a script or stylesheet.
START
Inventory the folder, show me a plan, wait for my go-ahead, then convert the home page only.How to run it
- Unzip the download to ./exported-site and open the project in your AI coding tool.
- Paste the prompt, approve the plan, then commit after each page that matches the live site.
What to expect from Squarespace to Next.js
The Squarespace copy contains finished pages, template stylesheets, gallery scripts and images. The CSS leans on Squarespace’s own class names, so a visual match comes from keeping the markup structure close and moving it into components. Galleries are the part that needs real rebuilding, because their scripts expect Squarespace’s markup.
Start with a page that has no gallery and no form. When that matches, add a gallery page, then the blog. Ask the assistant to write REDIRECTS.md as it goes, so the URL work is recorded while the old paths are still in front of it.
Questions the assistant should ask you
- Do your blog URLs contain dates, and should the new routes keep them?
- Where should the store and booking links point?
- Which galleries must keep their current behavior?
Verify the result
Run these from the project folder after each batch. The last command lists files that still refer to Squarespace.
npm install
npm run build
npm run start
# pages in the export vs routes in the project
find exported-site -name "*.html" | wc -l
find app -name "page.tsx" | wc -l
# files that still refer to the old platform
grep -rlE "squarespace-cdn.com|static1.squarespace.com" app public | head- next build finishes with no type or lint errors, and every old sitemap route returns 200.
- With output set to export, the out folder holds one HTML file per route.
- Open one dated blog URL from the old sitemap and confirm it answers with the right page or a 301.
- Test each gallery at a phone-width window.
What can go wrong
- Galleries keep their Squarespace script and look right but still depend on classes the assistant renamed. Keep markup and classes together.
- Form, newsletter and store blocks post to Squarespace. The prompt replaces them, and you still need a working endpoint.
- Dated blog URLs without redirects return 404s. See the SEO migration guide.
Frequently asked questions
Does the Squarespace XML export help with this?
Not for a code conversion. Squarespace’s help describes it as content for importing elsewhere. The WebExport copy holds the finished pages that the assistant works from.
What about my store?
Commerce runs on Squarespace’s servers. The prompt links product pages to a store you choose and does not try to rebuild checkout.
How do I keep blog URLs the same?
Ask the assistant to keep each path as a route. If the paths contain dates, keep them or record each change in REDIRECTS.md and add 301 redirects in your host.
Can I host the converted project on Netlify?
Yes. A static export works on any static host. See Squarespace on Netlify for redirect and form details.
Official documentation
Free tools for this job
- Squarespace Exit PlannerStep-by-step guide and checklist generator for leaving Squarespace.
- No-Code Lock-in ScoreAnalyze any platform and get a portability score with data export options.
- No-Code Asset Path NormalizerRewrite CDN URLs to local relative paths for offline and self-hosted deployments.
- Redirect Map BuilderBuild an old-to-final redirect mapping from URL lists.
Start with the files
The prompt works on a WebExport download. Paste your public Squarespace URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.