mirror of
https://github.com/go-gitea/gitea
synced 2025-01-03 14:34:30 +00:00
Fix view of readme file in the home code page. (#30564)
Gitea attempts to display image file, pdf file, etc. named readme in the home code page (but it cannot). I think only the markdown and plain-text file should be displayed, which is also the behavior of GitHub. Co-authored-by: jxshin <zhujiaxinabc@gmail.com>
This commit is contained in:
parent
a19d2bbd90
commit
a63f14b908
@ -68,6 +68,6 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{if .ReadmeExist}}
|
{{if and .ReadmeExist (or .IsMarkup .IsPlainText)}}
|
||||||
{{template "repo/view_file" .}}
|
{{template "repo/view_file" .}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user