Skip to main content

Module migration

Module migration 

Source

Functionsยง

create_page
Creates a new course page from a CMS update payload and returns its id.
ensure_unique_url_path ๐Ÿ”’
Appends a numeric suffix to base_path until it no longer collides with an existing (non-deleted) page in the course, so deriving slugs from duplicate or empty titles cannot hit the unique (course_id, url_path) constraint and abort the migration.
extract_title_from_blocks ๐Ÿ”’
Extract title from Gutenberg blocks (looks for hero-section or first heading)
slugify ๐Ÿ”’
Generate a URL-safe slug from a title.