Migration Guide
Migration Guide
The migration helper is designed to cover the common Carpentries lesson path, not every custom Jekyll feature ever added to a lesson repository.
Recommended migration sequence
- Run the checker on the legacy repository.
- Run the migrator into a clean output directory.
- Run the checker again on the migrated Hugo lesson.
- Build with Hugo and do a quick manual pass for layout, links, and custom branding.
go run github.com/oer-particle-physics/hugo-styles/cmd/hugo-styles-migrate@latest check .
go run github.com/oer-particle-physics/hugo-styles/cmd/hugo-styles-migrate@latest migrate --source ../legacy-lesson --dest /tmp/converted-lesson
go run github.com/oer-particle-physics/hugo-styles/cmd/hugo-styles-migrate@latest check /tmp/converted-lessonWhat it converts well
_episodes/*.mdinto Hugo episode content- common metadata fields such as
questions,objectives,keypoints,teaching, andexercises - legacy Carpentries exercise blocks
- common callout classes
{{site.baseurl}}asset paths- common
links.mdinclude cleanup - common YouTube and Vimeo iframe embeds
What usually needs a manual pass
- custom Jekyll includes or layouts
- repo-specific branding and footer logic
- unusual Liquid expressions
- site-specific navigation widgets
- custom glossary or reference structures
- uncommon iframe providers or hand-written embeds
That means migrations like hsf-training-docker and hsf-training-cicd should be mostly systematic, while more customised repositories such as gitlab-cms should expect a short manual clean-up phase.
What the checker validates after migration
When you run check on a Hugo lesson, it validates:
title,weight,questions,objectives, andkeypointson episodes- unique episode weights
- glossary/profile shortcode targets
- image alt text
- unsupported leftover legacy syntax