Skip to content
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

markdown href relative link issue #33972

Open
jwestfall69 opened this issue Mar 22, 2025 · 1 comment
Open

markdown href relative link issue #33972

jwestfall69 opened this issue Mar 22, 2025 · 1 comment
Labels

Comments

@jwestfall69
Copy link

Description

Hi

I have a markdown where I'm pointing at a large image that is relative to the markdown file. I'm displaying a scaled down version of the image and then have a href around it so the user can click on the image to get the full size version. To do this I'm using:

<a href="docs/images/gaiden_cpu_pcb_top.png"><img src="docs/images/gaiden_cpu_pcb_top.png" width="40%"></a>

The scaled down image shows correctly but the href url ends up being incorrect. The directory the markdown file is in is missing from the href url.

I put up a copy of my repo on the demo site so you can see the issue. The PCB images on the following page

https://demo.gitea.com/jwestfall69/mad/src/branch/main/machine/gaiden

Here is the same repo on github, where the href's are correct

https://github.com/jwestfall69/mad/tree/main/machine/gaiden

Gitea Version

Local gitea was 1.22.6, but still happens after upgrading to 1.23.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image

In the image the url at the top is https://demo.gitea.com/jwestfall69/mad/src/branch/main/machine/gaiden and at the bottom you can see the url it wants to go to if I click on the pcb image is https://demo.gitea.com/jwestfall69/mad/src/branch/main/machine/docs/images/gaiden_cpu_pcb_top.png, which is missing the gaiden directory the README.md is in.

Git Version

2.39.5

Operating System

Debian 12.8

How are you running Gitea?

I use your downloads for gitea and have it running as a systemd service on Debian 12.8.

Database

SQLite

@jwestfall69
Copy link
Author

It appears the issue is specific to the embedded/auto loading of README.md in the directory listing. If you bring up the full page render by clicking on README.md the href's are correct.

https://demo.gitea.com/jwestfall69/mad/src/branch/main/machine/gaiden/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant