CoursesRefactoring content for migration

Refactoring content for migration

11
Lessons
Simeon Griggs
Simeon GriggsPrincipal Educator at Sanity
Knut Melvær
Knut MelværHead of Developer Community and Education
Track
Replatforming from a legacy CMS to a Content Operation System

Lessons in this course

No matter where your content is, Sanity provides options to ensure its smooth transfer to the Content Lake. These are general strategies for developers migrating content.


1: Introduction to content migrations

1
Task

Gain the technical know-how to successfully migrate content to Sanity, adapting to unique project needs and confidently handling transactions and mutations.


2: General migration principles

4
Tasks

A developer guide to content migration covering idempotent scripts with incremental complexity and considered error handling.


3: Content normalization

2
Tasks

Migrating is an opportunity not only to move your content to Sanity, but your content strategy to structured content.


4: Deterministic and consistent IDs

1
Task

Reusing existing values from your content source helps prevent duplicate data and optimistically set strong references.


5: Setting created and modified dates

1
Task

While the Content Lake stores date time values for document operations, it may be better to write your own for editorial purposes.


6: Validating incoming content

1
Task

Never trust your existing content source. Validate all data during a migration to avoid future headaches.


7: Scripting content migrations

1
Task

Sanity's API-first design allows you to write content – even in huge volumes – however you prefer. The CLI Migration tooling offers several conveniences that make it a great fit.


8: Uploading assets efficiently

1
Task

Effortlessly manage and transform high-resolution images with Sanity's asset pipeline, avoid unnecessary uploads, and optimize content migration with metadata and in-memory cache.


9: Migrating to block content

2
Tasks

Convert HTML to presentation-agnostic Portable Text, even handling complex block content from WordPress' Gutenberg editor.


10: Reducing SEO impact

1
Task

Confidently migrate content into Sanity, maintain SEO standing, manage redirects, and prevent broken links. Ensure visual consistency with automated testing.


11: Conclusion

1
Task

You're now equipped to navigate content migration with a unique, well-documented strategy, adopting new technologies smoothly and predictably.