File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"code.gitea.io/gitea/models"
11
11
"code.gitea.io/gitea/modules/base"
12
12
"code.gitea.io/gitea/modules/context"
13
+ "code.gitea.io/gitea/modules/markup/markdown"
13
14
"code.gitea.io/gitea/modules/setting"
14
15
)
15
16
@@ -34,6 +35,9 @@ func Home(ctx *context.Context) {
34
35
35
36
ctx .Data ["PageIsUserProfile" ] = true
36
37
ctx .Data ["Title" ] = org .DisplayName ()
38
+ if len (org .Description ) != 0 {
39
+ ctx .Data ["RenderedDescription" ] = string (markdown .Render ([]byte (org .Description ), ctx .Repo .RepoLink , map [string ]string {"mode" : "document" }))
40
+ }
37
41
38
42
var orderBy models.SearchOrderBy
39
43
ctx .Data ["SortType" ] = ctx .Query ("sort" )
Original file line number Diff line number Diff line change 13
13
</span>
14
14
{{if .IsOrganizationOwner}}<a class="middle text grey" href="{{.OrgLink}}/settings">{{svg "octicon-gear"}}</a>{{end}}
15
15
</div>
16
- {{if .Org.Description }}<p class="desc ">{{.Org.Description }}</p>{{end}}
16
+ {{if $.RenderedDescription }}<p class="render-content markdown ">{{$.RenderedDescription|Str2html }}</p>{{end}}
17
17
<div class="text grey meta">
18
18
{{if .Org.Location}}<div class="item">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
19
19
{{if .Org.Website}}<div class="item">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
You can’t perform that action at this time.
0 commit comments