[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)

* [feature] Parse instance descriptors as markdown, show T&C on /about

* lint

* remove unnecessary nullzero tags
This commit is contained in:
tobi 2024-01-05 13:39:31 +01:00 committed by GitHub
commit d5e3996a18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 885 additions and 515 deletions

View file

@ -38,12 +38,16 @@ type InstanceV1 struct {
//
// This should be displayed on the 'about' page for an instance.
Description string `json:"description"`
// Raw (unparsed) version of description.
DescriptionText string `json:"description_text,omitempty"`
// A shorter description of the instance.
//
// Should be HTML formatted, but might be plaintext.
//
// This should be displayed on the instance splash/landing page.
ShortDescription string `json:"short_description"`
// Raw (unparsed) version of short description.
ShortDescriptionText string `json:"short_description_text,omitempty"`
// An email address that may be used for inquiries.
// example: admin@example.org
Email string `json:"email"`
@ -92,6 +96,8 @@ type InstanceV1 struct {
Rules []InstanceRule `json:"rules"`
// Terms and conditions for accounts on this instance.
Terms string `json:"terms,omitempty"`
// Raw (unparsed) version of terms.
TermsRaw string `json:"terms_text,omitempty"`
}
// InstanceV1URLs models instance-relevant URLs for client application consumption.