Add shpinx :doc: support to publish.

This code converts `:doc:` style links to the correct format for processing by standard docutils.