ford
ford copied to clipboard
Is it possible to add links to a section of the same page?
I am using Ford page_dir
feature to add some documentation in a project. I would like to know if it is possible to add links to a section of the same page.
I tried using the information I found here, links are added but they do not work.
I attach example files to this report: ford_links.tar.gz
Hi @ecasglez, you can make this work by adding:
md_extensions: markdown.extensions.toc
to your doc.md
configuration file. This uses the table of contents extension which adds the link anchors to each section heading.
Maybe this is an extension we should enable by default?
Hi. Thanks for your quick reply.
I didn't notice that I could manually activate additional markdown extensions. I think the current behaviour is OK unless a lot of people use this feature.
It is buried in the wiki, but it isn't obvious that this extension does what you want.
Github-flavoured markdown does enable this behaviour by default (which is dialect of markdown used in the SO link you posted), so I'm guessing a lot of people will be familiar with that.
If this behaviour is the default in some other tools, then it might be a good idea to have this as default in Ford too.