-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom schema for posts #41
Comments
What sort of relationship should we implement between post and site custom schema? Can custom schema attributes remain optional, i.e. assigning no value means no key? Should a post value override a site value, since it's more local? "Navigation links" in particular seems like an attribute that should remain at the site level or somehow merge with post navigation links. Should separate custom schema maps be maintained and override rules constructed for attributes they have in common? |
I was imagining they'd be separate; no need for post values to override site values. i.e. currently we have a I guess there could be overrides, but it would happen within the theme code. e.g. maybe a site has a custom attribute for author, but posts also have a custom author attribute. As the theme writer you'd probably make it so that posts use their own author value first but default to the site author if one isn't defined. But Platypub itself wouldn't need to be aware of that.
I think either way is fine. Looks like for
Originally my thought was that if a theme defines any new custom schema, it is the owner for those keys (and the keys should be namespaced accordingly, e.g. :com.platypub/primary-color etc.) With the current site custom config thing, I'd say if you wanted to make a new theme that reused the existing :com.platypub/* keys, you'd copy platypub's custom config and not make any changes. (of course at this point all custom config values are of type string, so it's not like there's much to override anyway.) However I'm beginning to think that before we implement any post custom schema stuff, maybe we should figure out exactly how item types (#43) are going to work, and then implement item types + custom post schema all at once. Otherwise I'd be afraid of implementing something that we're just going to change anyway. |
The event attributes I'm considering as additional item fields will include three of instant type. The conflation this introduces to the current model is high. |
The author attributes appear to be a good fit for customizing in posts. At the theme level perhaps they can be moved to a file like |
Sounds reasonable--I'm planning to put some thinkin' into a possible implementation this friday, so hopefully I'll have a concrete implementation we can poke holes in soon. |
We already support custom schema for sites. After #39 is closed, do the same for posts. See https://github.com/jacobobryant/platypub/blob/master/themes/default/custom-schema.edn. Grep for
custom-schema.edn
to see the places that sites' custom schema is already used and mirror that for posts.The text was updated successfully, but these errors were encountered: