mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix Readme render bug (#19992)
Fix #19988 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -357,7 +357,7 @@ func renderReadmeFile(ctx *context.Context, readmeFile *namedBlob, readmeTreelin
 | 
				
			|||||||
		var result strings.Builder
 | 
							var result strings.Builder
 | 
				
			||||||
		err := markup.Render(&markup.RenderContext{
 | 
							err := markup.Render(&markup.RenderContext{
 | 
				
			||||||
			Ctx:          ctx,
 | 
								Ctx:          ctx,
 | 
				
			||||||
			RelativePath: ctx.Repo.TreePath,
 | 
								RelativePath: path.Join(ctx.Repo.TreePath, readmeFile.name), // ctx.Repo.TreePath is the directory not the Readme so we must append the Readme filename (and path).
 | 
				
			||||||
			URLPrefix:    readmeTreelink,
 | 
								URLPrefix:    readmeTreelink,
 | 
				
			||||||
			Metas:        ctx.Repo.Repository.ComposeDocumentMetas(),
 | 
								Metas:        ctx.Repo.Repository.ComposeDocumentMetas(),
 | 
				
			||||||
			GitRepo:      ctx.Repo.GitRepo,
 | 
								GitRepo:      ctx.Repo.GitRepo,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user