-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add .profile README to organization pages #27125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ready for review? |
I think so, I've completed the feature :) |
|
||
language := ctx.FormTrim("language") | ||
ctx.Data["Language"] = language | ||
func PrepareOrgProfileTabData(ctx *context.Context, profileGitRepo *git.Repository, profileReadme *git.Blob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func PrepareOrgProfileTabData(ctx *context.Context, profileGitRepo *git.Repository, profileReadme *git.Blob) { | |
func prepareOrgProfileTabData(ctx *context.Context, profileGitRepo *git.Repository, profileReadme *git.Blob) { |
defer profileClose() | ||
ctx.Data["HasProfileReadme"] = profileReadmeBlob != nil | ||
|
||
PrepareOrgProfileTabData(ctx, profileGitRepo, profileReadmeBlob) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrepareOrgProfileTabData(ctx, profileGitRepo, profileReadmeBlob) | |
prepareOrgProfileTabData(ctx, profileGitRepo, profileReadmeBlob) |
It looks like #27955 also implemented this and has been merged. Thank you for the PR! ❤️ |
Currently, user profiles can have README markdown files displayed. Organizations can have this same thing on GitHub, so why not Gitea?
In adding this, I've also realised that since the user tab template is used by some organization pages, currently if a

.profile
repository and aREADME.md
file exist on an organization, an Overview tab is shown on some pages even though it simply redirects to the repositories page:So this PR also makes these work as they should!
Screenshots
Before:


After:
I've also added the overview tab everywhere the organization tabs are visible (of course, only when the
.profile
repo and a README file exist, matching the behaviour for user profile pages)