executablebooks / sphinx-panels

A sphinx extension for creating panels in a grid layout
https://sphinx-panels.readthedocs.io
MIT License
83 stars 20 forks source link

link-button of type ref to show the link text instead of the uri #65

Closed OriolAbril closed 2 years ago

OriolAbril commented 3 years ago

I generated a link button with :type: ref and without specifying any :text:, which resulted in the uri (path like text as it was a ref identifier) being shown as the button text instead of the title of the file like what :ref:`path/to/reference` is converted to. This seems to come from https://github.com/executablebooks/sphinx-panels/blob/4a310ebb0f2ba358a5ab08db07c3b9afbeb2bb96/sphinx_panels/button.py#L62 would it be possible to have the text show the title of the file instead of showing path/to/reference?

If you are interested, I would be happy to make a PR for this but I don't know where to start.

welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: