How to link the gallery
See original GitHub issueHello. I’m fairly new to sphinx-gallery and sphinx in general, and here is my problem.
I created a plot_example.py
script and placed it in my examples_dirs
folder. As a result, I do see it copied in the gallery_dirs
folder, that is, I get the file auto_examples/plot_example.py
. Then, to include a link to the gallery in my main documentation page (index.rst
), I have the line
:doc:`Gallery <auto_examples/index>`
However, when building the doc, I get:
WARNING: undefined label: sphx_glr_auto_examples_plot_example.py (if the link has no caption the label must precede a section header)
and indeed the link to this example is broken. What am I doing wrong?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Wix Pro Gallery: Adding a Link to a Gallery Item | Help Center
First, add a link to the gallery item. Then you can choose to set your gallery items to open a link when clicked....
Read more >How to Add Custom Links to Gallery Images in ... - WPBeginner
Simply go to a post or page and create a new gallery. You will see the custom link meta fields for individual images...
Read more >Share photos & videos - Android - Google Photos Help
Send a link or share to other apps · On your mobile device, open the Google Photos app Photos . · Select a...
Read more >How Do I Link a Gallery to a Page in Squarespace?
You can add a gallery to a page, but the only way to link to it is by using the gallery's URL. This...
Read more >How to Add Custom Hyperlinks to Your WordPress Gallery ...
Adding Custom Links to Individual Images · Select an image from your gallery · Enter the custom Link URL from the Attachment Details...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exactly what I imagined. In your example
plot_example.py
when you write the docstring you need to make the title a heading. Using rst syntax is just underlining it with something. That solves the problem.Now, I wonder why no exception is raised in this case.
That’s it! Thank you Titan-C. Looking back at the sphinx-gallery documentation, the instructions were unequivocal:
Yet, an example would have been helpful for sphinx newbies. Cheers!