Skip to content

🔗 directive not working  #77

Closed as not planned
Closed as not planned

Description

@sistia01

Describe the bug

I am trying to allow my grid item card to be clickable but it is not working with any of the methods that I have tried.

I have tried doing :target: only with :image: and link under grid-item-card (with both doc and ref) but none of these options are working.

.. grid:: 4

.. grid-item-card::
	:link: mini_visium
	:link-type: ref

    .. image:: images/getting_started/icons_configuration.png
		:target: :ref:`mini_visium` (*Note: referenced as .. _minivisium: in subsections | I have also tried using the file path)

Screen Shot 2022-06-29 at 3 12 30 PM

I have also tried (outdated):

.. card-carousel:: 7

.. card::
	:link: mini_visium
	:link-type: ref

    .. image:: images/getting_started/icons_configuration.png

Any help on this would be greatly appreciated!

Reproduce the bug

GitHub repo: https://github.com/sistia01/Giotto/tree/suite/docs

page: https://github.com/sistia01/Giotto/blob/suite/docs/source/gettingstarted.rst

List your environment

conda version : 4.13.0
python version : 3.9.12.final.0
sphinx-design 0.2.0
sphinx 4.5.0

Activity

  1. added
    bug
    on Jun 29, 2022
  2. added a commit that references this issue on Jul 30, 2022
  3. chrisjsewell commented on Jul 30, 2022

    @chrisjsewell
    Member

    Heya, in #84 I tried to reproduce your issue, however, as you can see here https://sphinx-design--84.org.readthedocs.build/en/84/test.html, it seems to work fine?

  4. added and removed
    bug
    on Jul 30, 2022
  5. Kimvana commented on Feb 24, 2025

    @Kimvana

    I have the same issue, when trying to have a clickable card direct to an internal reference-type link, it doesn't work.

    I'm running sphinx 7.3.7, sphinx-design 0.6.0, python 3.10.11.

    I can have a card point to a specific file (using :link-type: doc), but when I want to use ref instead, I cant get it to work. Seems it has to do something with linking to references that are only specified later. I've got my directives specified lower down in the document than the grid.

    I've tried the following (all nested in a .. grid:: directive):

     .. grid-item-card::
            :link: mylink
            :link-type: ref
    
     .. grid-item-card::
            :link: `mylink`
            :link-type: ref
    
    .. grid-item-card::
            :link: `<mylink>`
            :link-type: ref
    
    .. grid-item-card::
            :link: :ref:`mylink`
            :link-type: ref
    
    .. grid-item-card::
            :link: :ref`<mylink>`
            :link-type: ref
    
  6. chrisjsewell commented on Jul 12, 2026

    @chrisjsewell
    Member

    Closing as this has been waiting on a reproducible example since 2022. If you're still hitting problems with clickable cards, please open a fresh issue with a minimal snippet plus your theme and package versions and we'll take a look — the current :link:/:link-type: examples are at https://sphinx-design.readthedocs.io/en/latest/cards.html#clickable-cards. Thanks for the original report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions