Publishing (Org Mode Compact Guide)

Next: Working with Source Code, Previous: Exporting, Up: Top [Contents]

## 13 Publishing

Org includes a publishing management system that allows you to configure automatic HTML conversion of projects composed of interlinked Org files. You can also configure Org to automatically upload your exported HTML pages and related attachments, such as images and source code files, to a web server.

You can also use Org to convert files into PDF, or even combine HTML and PDF conversion so that files are available in both formats on the server.

For detailed instructions about setup, see the manual. Here is an example:

    (setq org-publish-project-alist
          '(("org"
             :base-directory "~/org/"
             :publishing-directory "~/public_html"
             :section-numbers nil
             :table-of-contents nil
             :style "<link rel=\"stylesheet\"
                    href=\"../other/mystyle.css\"
                    type=\"text/css\"/>")))

`C-c C-e P x`

  Prompt for a specific project and publish all files that belong to it.

`C-c C-e P p`

  Publish the project containing the current file.

`C-c C-e P f`

  Publish only the current file.

`C-c C-e P a`

  Publish every project.

Org uses timestamps to track when a file has changed. The above functions normally only publish changed files. You can override this and force publishing of all files by giving a prefix argument to any of the commands above.