Skip to content

Move all slugs in BBCode files #1285

@NathanLovato

Description

@NathanLovato

Right now, URL slugs are defined in multiple places: in bbcode for practices and in LESSONS as a dict mapping files to slugs. Other dicts map aliases for legacy URLs that depended on Godot resources.

I'd like all this to have one source of truth in one place, and I'm thinking the BBCode is probably the better place to keep all the lesson metadata. The main caveat I could think of was that putting all the metadata in BBCode would involve parsing the BBCode on startup, but reading the code I found that the function CourseIndexPaths.build_all_practice_slugs() parses all bbcode files on startup for navigation anyway.

In the course index, ideally, we should just have a list of lesson files to give the lesson order.

There's just the question of the _LESSON_SLUG_ALIASES` dict: should it stay as a dict or should the aliases be encoded in the bbcode? I'm thinking maybe aliases should also go to the BBCode because lesson titles and slugs might change as we rework lessons. We generally need to be able to update the slugs and add redirects moving forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions