1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00
This commit is contained in:
Unknwon
2015-12-04 21:30:33 -05:00
parent 76d4b9288b
commit e538ff2770
25 changed files with 248 additions and 94 deletions

View File

@@ -24,6 +24,12 @@ const (
WIKI_PAGES base.TplName = "repo/wiki/pages"
)
func MustEnableWiki(ctx *middleware.Context) {
if !ctx.Repo.Repository.EnableWiki {
ctx.Handle(404, "MustEnableWiki", nil)
}
}
type PageMeta struct {
Name string
URL string
@@ -94,7 +100,7 @@ func renderWikiPage(ctx *middleware.Context, isViewPage bool) (*git.Repository,
return nil, ""
}
if isViewPage {
ctx.Data["content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink))
ctx.Data["content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas()))
} else {
ctx.Data["content"] = string(data)
}