ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
852 stars 330 forks source link

Links in the readme are not working for collections on galaxy portal #2869

Open shenda1 opened 2 years ago

shenda1 commented 2 years ago

Bug Report

SUMMARY

The local links mentioned in the readme file, referring to any other local file residing in the same folder(e.g. docs folder inside the collection tarball) are not working.

STEPS TO REPRODUCE

1) Consider there are 2 files inside the docs folder in the collection tarball. a) Readme.md b) ProductGuide.md 2) Now, any link provided in the readme with the local relative path e.g. "docs/Product%20Guide.md#info-module" is not navigating to the intended link.

EXPECTED RESULTS

The link should redirect to the intended link, which is working as expected in GitHub and other repositories.

ACTUAL RESULTS

Collection Link: https://galaxy.ansible.com/dellemc/powerflex

image

Once you click any link shown in the above screenshot, it is redirecting it to the URL "https://galaxy.ansible.com/docs/Product%20Guide.md#info-module" but not loading the actual content.

image

shenda1 commented 2 years ago

Gentle reminder on this !

alisonlhart commented 2 years ago

Hello @shenda1 ! The relative path you're using, docs/Product%20Guide.md#info-module, does not exist on Galaxy like it does in github or other controlled SCM. This path (https://galaxy.ansible.com/docs/) is pointing to a directory outside the namespace/collection. But even with that in mind, the main issue is that Galaxy only builds the readme.md file for documentation on the Galaxy site, and I don't believe it builds other markdown files into onsite documentation. You can modify these Galaxy readme links to point to the github documentation instead, such as https://github.com/dell/ansible-powerflex/blob/1.1.1/docs/Release%20Notes.md#product-description .

shenda1 commented 2 years ago

Hello @alisonlhart The relative path mentioned in the readme file refers to a local resource md file present within the collection tarball. It's not pointing to a directory outside the collection. It works perfectly fine on GitHub and other distribution channels. It's easy to maintain relative links within the archive, which ensures to refer the correct path always. Since this approach is failing only with galaxy so maintaining different versions for different distribution channels is not so effective. Hence we used a relative path instead of an absolute path. Can you please consider this enhancement request?