mirror of
https://github.com/go-gitea/gitea
synced 2024-11-19 00:11:24 +01:00
Do not show filename not have suffifx .md
This commit is contained in:
parent
3a30c06345
commit
e84ac64964
5 changed files with 7 additions and 7 deletions
|
@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
|
||||||
|
|
||||||
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
|
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
|
||||||
|
|
||||||
##### Current tip version: 0.9.33 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
##### Current tip version: 0.9.34 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
||||||
|
|
||||||
| Web | UI | Preview |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.33.0630"
|
const APP_VER = "0.9.34.0630"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -64,7 +64,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, str
|
||||||
}
|
}
|
||||||
pages := make([]PageMeta, 0, len(entries))
|
pages := make([]PageMeta, 0, len(entries))
|
||||||
for i := range entries {
|
for i := range entries {
|
||||||
if entries[i].Type == git.OBJECT_BLOB {
|
if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") {
|
||||||
name := strings.TrimSuffix(entries[i].Name(), ".md")
|
name := strings.TrimSuffix(entries[i].Name(), ".md")
|
||||||
pages = append(pages, PageMeta{
|
pages = append(pages, PageMeta{
|
||||||
Name: name,
|
Name: name,
|
||||||
|
@ -167,7 +167,7 @@ func WikiPages(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
pages := make([]PageMeta, 0, len(entries))
|
pages := make([]PageMeta, 0, len(entries))
|
||||||
for i := range entries {
|
for i := range entries {
|
||||||
if entries[i].Type == git.OBJECT_BLOB {
|
if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") {
|
||||||
c, err := wikiRepo.GetCommitByPath(entries[i].Name())
|
c, err := wikiRepo.GetCommitByPath(entries[i].Name())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "GetCommit", err)
|
ctx.Handle(500, "GetCommit", err)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.9.33.0630
|
0.9.34.0630
|
Loading…
Reference in a new issue