Skip to content

Design schema for site content #47

Description

@baraqkamsani

Schemas enforce certain metadata in contents of the site.

See src/content/config.ts for context:

classDiagram
    direction BT

    class Position {
        String committee
        String role
    }

    class Image {
        String url
        String alt
    }

    class Member {
        Id     m_slug
        String m_nameFirst
        String m_nameLast
        String m_bio
        Enum m_status[alumni, current]
    }

    class Post {
        Id p_slug
        StringArr p_authors
        StringArr p_categories DEFAULT [  ]
        StringArr p_posts
        String p_title
        String p_description
        Boolean p_draft
        Date p_published
        Date p_updated
    }

    class Category {
        Id c_slug
        String c_title
        String c_description
    }

    Post --> Member: p_authors REF m_slug 
    Post --> Category: p_categories REF c_slug
    Position --* Member: Aggregation
    Image --* Member: Composition
    Image --* Post: Composition
Loading

The above schema needs to be converted to content collections format.

Some of these values can be set as optional.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions