- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

13.1.6 Links between published files

To create a link from one Org file to another, you would use something like ‘[[file:foo.org][The foo]]’ or simply ‘file:foo.org.’ (see section 4 Hyperlinks). When published, this link becomes a link to ‘foo.html’. In this way, you can interlink the pages of your "org web" project and the links will work as expected when you publish them to HTML. If you also publish the Org source file and want to link to that, use an http: link instead of a file: link, because file: links are converted to link to the corresponding ‘html’ file.

You may also link to related files, such as images. Provided you are careful with relative file names, and provided you have also configured Org to upload the related files, these links will work too. See section 13.3.2 Example: complex publishing configuration, for an example of this usage.

Sometimes an Org file to be published may contain links that are only valid in your production environment, but not in the publishing location. In this case, use the property

:link-validation-function Function to validate links
to define a function for checking link validity. This function must accept two arguments, the file name and a directory relative to which the file name is interpreted in the production environment. If this function returns nil, then the HTML generator will only insert a description into the HTML file, but no link. One option for this function is org-publish-validate-link which checks if the given file is part of any project in org-publish-project-alist.
ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition