mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 02:08:36 +00:00
Add markdown support in organization description (#13549)
Similarly to how you can write some markdown in user profile description, you can now use the same feature in organization description. As discussed in discord. kudos to @mrsdizzie and @zeripath visualization: 
This commit is contained in:
committed by
GitHub
parent
d025d84d91
commit
3ea237b333
@@ -10,6 +10,7 @@ import (
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/markup/markdown"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
)
|
||||
|
||||
@@ -34,6 +35,9 @@ func Home(ctx *context.Context) {
|
||||
|
||||
ctx.Data["PageIsUserProfile"] = true
|
||||
ctx.Data["Title"] = org.DisplayName()
|
||||
if len(org.Description) != 0 {
|
||||
ctx.Data["RenderedDescription"] = string(markdown.Render([]byte(org.Description), ctx.Repo.RepoLink, map[string]string{"mode": "document"}))
|
||||
}
|
||||
|
||||
var orderBy models.SearchOrderBy
|
||||
ctx.Data["SortType"] = ctx.Query("sort")
|
||||
|
Reference in New Issue
Block a user