executablebooks / sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
https://sphinx-design.readthedocs.io/en/furo-theme/
MIT License
192 stars 61 forks source link

:ref: does not resolve autosectionlabel #110

Open daltzctr opened 1 year ago

daltzctr commented 1 year ago

Describe the bug

With the sphinx.ext.autosectionlabel extension installed, it automatically generates references to sections in pages. You would typically reference this section by the following syntax

My :ref:`this is a reference </docs/myarticle:my article section>`

However sphinx design fails to resolve this with undefined label: myarticlesection

Reproduce the bug

  1. Add sphinx.ext.autosectionlabel to your extensions
.. grid:: 2

   .. grid-item-card:: Ref Example
      :link: /docs/myarticle:my section name
      :link-type: ref

List your environment

python = "^3.9"
doc8 = "==0.11.1"
docutils = "==0.17.0"
fonttools = {version = "==4.33.3", extras = ["woff"]}
furo = "==2022.9.29"
latex = "==0.7.0"
packaging = "==20.9"
sphinx = "==4.5.0"
sphinx-hoverxref = "==1.0.1"
sphinx-notfound-page = "==0.8.0"
sphinx_design = "==0.3.0"
sphinxcontrib-ghcontributors = "==0.2.3"
sphinxcontrib-htmlhelp = "==2.0.0"
sphinxcontrib-serializinghtml = "==1.1.5"
sphinxcontrib-svg2pdfconverter = "==1.2.0"
sphinxext-delta = "==0.2.0"
sphinxext-mimic = "==0.1.1"
sphinxext-opengraph = "==0.4.1"
sphinxext-rediraffe = "==0.2.5"
sphinxext-remoteliteralinclude = "==0.3.0"
urllib3 = ">=1.26.6, <2.0.0"
welcome[bot] commented 1 year 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:

jhj0411jhj commented 1 year ago

I write this in my docs. And :ref: goes well:

extensions += ['sphinx.ext.autosectionlabel']
# Make sure the target is unique
autosectionlabel_prefix_document = True
autosectionlabel_maxdepth = None

the following syntax is shown correctly:

:ref:`design principle <overview/overview:design principle>`

But I didn't try grid or link in your problem. Hope this will provide some useful information.