mirror of https://github.com/mindoc-org/mindoc.git
修复项目概述不解析Markdown的BUG
parent
c3e758ab4f
commit
405a9c309f
|
@ -22,6 +22,7 @@ import (
|
||||||
"github.com/lifei6671/mindoc/utils/pagination"
|
"github.com/lifei6671/mindoc/utils/pagination"
|
||||||
"net/http"
|
"net/http"
|
||||||
"github.com/lifei6671/mindoc/converter"
|
"github.com/lifei6671/mindoc/converter"
|
||||||
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BookController struct {
|
type BookController struct {
|
||||||
|
@ -76,6 +77,7 @@ func (c *BookController) Dashboard() {
|
||||||
c.Abort("500")
|
c.Abort("500")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.Data["Description"] = template.HTML(blackfriday.MarkdownBasic([]byte(book.Description)))
|
||||||
c.Data["Model"] = *book
|
c.Data["Model"] = *book
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<span class="title">文档标签:</span>
|
<span class="title">文档标签:</span>
|
||||||
<span class="body">{{.Model.Label}}</span>
|
<span class="body">{{.Model.Label}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary">{{.Model.Description}} </div>
|
<div class="summary">{{.Description}} </div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue