From 65171d0bf7cf0ebbf7f79a1f31ed235d5cb388be Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 15 Mar 2023 17:59:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9Areadme=E6=97=A0?= =?UTF-8?q?=E5=90=8E=E7=BC=80=E4=B9=9F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/hat/repo/file.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routers/hat/repo/file.go b/routers/hat/repo/file.go index 4be468a..d417542 100644 --- a/routers/hat/repo/file.go +++ b/routers/hat/repo/file.go @@ -149,6 +149,9 @@ func GetReadmeContents(ctx *context.APIContext) { if strings.ToLower(file.Name) == "readme_zh.md" { readmezhPath = file.Name } + if strings.ToLower(file.Name) == "readme" { + readmePath = file.Name + } } } @@ -202,6 +205,9 @@ func GetReadmeContentsByPath(ctx *context.APIContext) { if strings.ToLower(file.Name) == "readme_zh.md" { readmezhPath = file.Name } + if strings.ToLower(file.Name) == "readme" { + readmePath = file.Name + } } }