I prefer to use the Asciidoctor toolchain, but it's compatible with Acsiidoc.
https://hackage.haskell.org/package/pandoc-crossref
https://lierdakil.github.io/pandoc-crossref/