-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.
Milestone
Description
Description
I tried to provide some files in the wiki via the link markdown
So I cloned the repo, I added a new folder, added the files and linked them as described here
When you click the link, the wiki opens a new page
Gitea Version
1.20.1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Docker
Database
None
Metadata
Metadata
Assignees
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.
Type
Projects
Relationships
Development
Select code repository
Activity
BElluu commentedon Sep 19, 2023
Something is wrong with method WebPathToGitPath in file ./services/wiki/wiki_path.go
@bauermarkus if you need access to your files in wiki pages, for now you can create link like this:
For example, if your main branch is named master, files is directory in root
[Link name](/raw/branch/master/files/MyFile.pdf "Test Alt text")
bauermarkus commentedon Oct 27, 2023
@BElluu Thanks a lot. But if I do that, I get a 404
rafaelsgirao commentedon Mar 11, 2024
I'm interested in fixing this bug and would like to open a pull request soon.
I managed to reproduce this locally and made a proof-of-concept fix, which, at first glance, seems to work:
Relative links to files which are not registered as renderable by Gitea now feature a raw link instead of a regular wiki link.
Before:

After:

For reference, this is the wiki markdown file I created for testing (
Home.md
):Use raw Wiki links for non-renderable Wiki files
Use raw Wiki links for non-renderable Wiki files
lunny commentedon Apr 10, 2024
Since it's not by design in previous versions, I think feature is a better label for this issue.
Use raw Wiki links for non-renderable Wiki files (#30273)