Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make linkcheck ignores URLs with anchor tags #292

Open
mstpn opened this issue Nov 7, 2024 · 1 comment
Open

make linkcheck ignores URLs with anchor tags #292

mstpn opened this issue Nov 7, 2024 · 1 comment

Comments

@mstpn
Copy link
Member

mstpn commented Nov 7, 2024

When I was running make linkcheck for changes to a recent PR, I noticed that a number of links were marked as -ignored that I didn't expect.

...
(           index: line   46) -ignored- https://web.libera.chat/#ubuntu-cloud                                                                                                                  
(           index: line   47) -ignored- #public-images-contribute                                                                                                                              
(public-images-explanation/index: line    8) -ignored- #lxd-openstack-images                                                                                                                   
(public-images-explanation/index: line    9) -ignored- #vagrant-explanation                                                                                                                    
(public-images-explanation/lxd-openstack-images: line   53) -ignored- #lxd-tarball-ref                                                                                                         
(public-images-explanation/lxd-openstack-images: line   61) -ignored- #root-tarball-ref                                                                                                        
(public-images-explanation/lxd-openstack-images: line   63) -ignored- #squashfs-ref                                                                                                            
(public-images-explanation/lxd-openstack-images: line   65) -ignored- #qcow-ref                                                                                                                
(public-images-explanation/lxd-openstack-images: line   97) -ignored- https://docs.openstack.org/ocata/admin-guide/common/cli-manage-images.html#create-or-update-an-image-glance              
(public-images-explanation/vagrant: line   25) -ignored- #public-images-how-to                                                                                                                 
(public-images-how-to/build-vagrant-with-bartender: line   88) -ignored- #run-a-vagrant-box                                                                                                    
(public-images-how-to/contribute-to-these-docs: line   51) -ignored- https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree                             
(public-images-how-to/index: line    7) -ignored- #vagrant-bartender                                                                                                                           
(public-images-how-to/index: line    8) -ignored- #use-local-cloud-init-ds                                                                                                                     
(public-images-how-to/index: line    9) -ignored- #launch-libvirt                                                                                                                              
(public-images-how-to/index: line   10) -ignored- #qcow-qemu                                                                                                                                   
(public-images-how-to/index: line   12) -ignored- #run-an-ova-using-virtualbox                                                                                                                 
(public-images-how-to/launch-with-libvirt: line   18) -ignored- #specify-cloud-init-user-data                                                                                                  
(public-images-how-to/run-a-vagrant-box: line   55) -ignored- https://git.launchpad.net/livecd-rootfs/tree/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary#n141                              
(public-images-how-to/run-an-ova-using-virtualbox: line    6) -ignored- https://documentation.ubuntu.com/public-images/en/latest/public-images-reference/artifacts/#ova                        
(public-images-how-to/use-local-cloud-init-ds: line   50) -ignored- https://cloudinit.readthedocs.io/en/latest/explanation/instancedata.html#instance-metadata    
...

It looks like the linkcheck function is erroneously marking any URL containing a hashtag (#) as a link that should be ignored. This is an error, as any URL with an anchor link isn't being tested for validity.

@k-dimple
Copy link
Collaborator

k-dimple commented Nov 7, 2024

Hi Matthew, this was done on purpose to avoid the generation of broken link errors for links like https://ubuntu.com/aws#get-in-touch (which in fact is not broken). We'll see if we can figure out a better way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants