[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
parent 511ad97fe7
commit d5e3996a18
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.