Include docx file in asciidoc?

1.9k views Asked by At

I am using asciidoc with asciidoctor to create documentation for a current project.

I notice there is a markup to include files in the documentation like so:

link:index.html or link:protocol.json[Open the JSON file]

Is it possible to include a docx file as a link so that it would open externally or be able to downloaded? Also can I put this file in a folder inside my asciidoc directory (for the sake of organization) and still be able to properly reference it?

1

There are 1 answers

2
Jmini On BEST ANSWER

You write something like this:

Open this link:somefile.docx[Word file] should work.

Or this link:file:///C:/Users/xxx/docs/otherfile.docx[second file].

It works with relative path or absolute path.


You need to ensure that the path to your file will be correct for the reader of your document.

Example: if you put the HTML files produced by Asciidoctor on a webserver (public or intranet), having a path referencing your local C: is not a good idea.

It is hard to tell you what to do without knowledge of your publication/distribution toolchain.