Skip to content

Commit

Permalink
Fix view of readme file in the home code page. (#30564)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jxshin and jxshin authored Apr 25, 2024
1 parent a19d2bb commit a63f14b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/view_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
{{end}}
</tbody>
</table>
{{if .ReadmeExist}}
{{if and .ReadmeExist (or .IsMarkup .IsPlainText)}}
{{template "repo/view_file" .}}
{{end}}

0 comments on commit a63f14b

Please sign in to comment.