Skip to main content
Module migration
headless_
lms_
models
0.1.0
Module migration
Module Items
Functions
In headless_
lms_
models::
library
headless_lms_models
::
library
Module
migration
Copy item path
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.