Publishing and Citations
Exporting converts one document at a time. A website, a set of course notes or a project’s documentation consists of many files that link to each other, share a style and sit next to images and stylesheets. Exporting each file by hand quickly becomes tedious and error-prone. Org’s publishing system describes such a collection once, as a project, and then rebuilds all of it, or only the parts that changed, with one command.
The second half of this chapter covers citations: references to entries in a bibliography, written with their own Org syntax and formatted by citation processors during export. Citations matter most for papers and theses, but they work in every backend, including HTML, so they fit well beside publishing.
All outputs below come from running Org 9.8.13 in emacs -Q --batch.
The idea: a project describes files, a destination and an action
A publishing project answers three questions:
- Which files? A base directory, a file extension (a regular expression) and optional include and exclude rules.
- Where to? A publishing directory, which can be local or remote.
- How? A publishing function that turns one source file into its output: export to HTML, export to PDF, or simply copy.
Every project is one entry in the variable org-publish-project-alist. An entry is a name followed by a property list:
("notes"
:base-directory "~/notes/"
:publishing-directory "~/public_html/"
:publishing-function org-html-publish-to-html)
A project can also be a list of other projects, given as :components. Publishing such a meta-project publishes each component in turn. This is the usual way to combine Org pages (which need exporting) with static files (which need copying), because the two kinds of files need different publishing functions.
A complete small site
The rest of the first half builds one site and examines what Org produces. The source tree looks like this:
site/
publish.el
org/
index.org
about.org
posts/
first-post.org
second-post.org
static/
css/style.css
img/logo.svg
The Org pages link to each other with ordinary file: links. index.org:
#+TITLE: Ada's Notebook
Welcome. Read [[file:posts/first-post.org][my first post]] or the [[file:about.org::#contact][contact details]].
[[file:img/logo.svg]]
about.org:
#+TITLE: About
#+DATE: <2026-10-01>
#+INDEX: Contact
* Contact
:PROPERTIES:
:CUSTOM_ID: contact
:END:
Write to ada@example.org.
posts/first-post.org:
#+TITLE: First Post
#+DATE: <2026-11-02>
#+INDEX: Publishing!first steps
Back to the [[file:../index.org][home page]].
posts/second-post.org is similar, with #+DATE: <2026-11-15> and no index entry.
The configuration
publish.el defines three projects: one for pages, one for static files and one that combines them.
;;; publish.el --- publishing setup -*- lexical-binding: t -*-
(require 'ox-publish)
(defvar my-root (file-name-directory (or load-file-name buffer-file-name)))
(setq org-publish-timestamp-directory (expand-file-name ".timestamps/" my-root))
(setq org-publish-project-alist
`(("site-pages"
:base-directory ,(expand-file-name "org/" my-root)
:base-extension "org"
:recursive t
:publishing-directory ,(expand-file-name "public/" my-root)
:publishing-function org-html-publish-to-html
:section-numbers nil
:with-toc nil
:html-doctype "html5"
:html-head "<link rel=\"stylesheet\" href=\"/css/style.css\" />"
:html-head-include-default-style nil
:html-head-include-scripts nil
:html-postamble nil
:auto-sitemap t
:sitemap-filename "sitemap.org"
:sitemap-title "All Pages"
:sitemap-style list
:sitemap-sort-files anti-chronologically
:makeindex t)
("site-static"
:base-directory ,(expand-file-name "static/" my-root)
:base-extension "css\\|svg\\|png"
:recursive t
:publishing-directory ,(expand-file-name "public/" my-root)
:publishing-function org-publish-attachment)
("site" :components ("site-pages" "site-static"))))
The backquote and commas build absolute paths from the location of publish.el, so the project works wherever the directory is checked out. Keeping the configuration in the repository, instead of in your personal init file, also lets a CI job or a colleague build the site.
flowchart LR S["site<br/>:components"] -->|"1st"| P["site-pages<br/>org-html-publish-to-html"] S -->|"2nd"| T["site-static<br/>org-publish-attachment"] OD["org/*.org"] -->|export| P SD["static/css, static/img"] -->|copy| T P -->|".html, sitemap, index"| OUT["public/"] T -->|"same relative paths"| OUT
Figure 16.1: The meta-project site publishes two components in order; one exports Org pages, the other copies static files, and both write into the same output tree.
Running it
Publishing is ordinary Emacs Lisp, so it runs in batch mode without any user interaction:
emacs --batch -l publish.el --eval '(org-publish "site" t)'
The second argument of org-publish is force; t publishes every file regardless of whether it changed. The messages of the first run show the order of events:
Generating sitemap for All Pages
Publishing file .../site/org/sitemap.org using 'org-html-publish-to-html'
Publishing file .../site/org/about.org using 'org-html-publish-to-html'
Publishing file .../site/org/posts/second-post.org using 'org-html-publish-to-html'
Publishing file .../site/org/posts/first-post.org using 'org-html-publish-to-html'
Publishing file .../site/org/index.org using 'org-html-publish-to-html'
Publishing file .../site/org/theindex.org using 'org-html-publish-to-html'
Resetting org-publish-cache
Publishing file .../site/static/img/logo.svg using 'org-publish-attachment'
Publishing file .../site/static/css/style.css using 'org-publish-attachment'
The resulting tree:
org/sitemap.org (generated)
org/theindex.inc (generated)
org/theindex.org (generated)
public/about.html
public/css/style.css
public/img/logo.svg
public/index.html
public/posts/first-post.html
public/posts/second-post.html
public/sitemap.html
public/theindex.html
Note that Org writes the generated sitemap and index files into the source directory and then publishes them like any other page. Add them to your version control ignore list if you do not want to commit them.
Links survive publishing
When the HTML backend exports a link to another .org file, it rewrites the extension to .html and keeps the path relative. This is what makes a set of Org files work as a website. The body of public/index.html:
<h1 class="title">Ada's Notebook</h1>
<p>
Welcome. Read <a href="posts/first-post.html">my first post</a> or the <a href="about.html#contact">contact details</a>.
</p>
<div id="org36f252d" class="figure">
<p><img src="img/logo.svg" alt="logo.svg" class="org-svg">
</p>
</div>
and from public/posts/first-post.html:
Back to the <a href="../index.html">home page</a>.
Three kinds of links worked here:
- Plain file links to other pages (
file:posts/first-post.org) became.htmllinks. - A link with a search option (
file:about.org::#contact) became an anchor in the target page. Search options for headlines (::*heading) and targets (::target) are resolved in the same way. - The image link
file:img/logo.svgwas copied as it is. In the source tree it is broken, becauseorg/img/logo.svgdoes not exist. In the published tree it works, becausesite-staticcopiesstatic/img/topublic/img/, next to the HTML files.
The last point is the general rule for assets: design the output tree first, then write links that are correct relative to the published file. Either mirror the output layout in your sources (keep img/ beside the Org files), or accept, as here, that a link is resolved only in the published site. If you want a link to the Org source itself, use an http link, because file: links to .org files are always rewritten.
Selecting files
These properties decide which files belong to a project:
| Property | Meaning |
|---|---|
:base-directory | Where the source files live (required) |
:base-extension | Regular expression for the extension, without the dot; default "org". The symbol any selects every file |
:recursive | Non-nil to descend into subdirectories |
:exclude | Regular expression for file names to skip |
:include | List of extra files, relative to the base directory, published regardless of extension and exclusion |
Exclusion is applied first, then the :include list is added. A typical exclusion keeps drafts and private notes out of the site:
:exclude "\\`drafts/\\|private\\.org\\'"
Within a project that publishes Org files, finer control comes from the export settings of Exporting: a :noexport: subtree disappears from the page, a COMMENT subtree is removed before code runs, and a file can use #+SELECT_TAGS: to publish only some sections.
Publishing functions
:publishing-function takes either a function or a list of functions. With a list, every function runs on every file, so one project can produce several formats at once.
| Function | Result |
|---|---|
org-html-publish-to-html | HTML page (the default) |
org-latex-publish-to-pdf | PDF via LaTeX |
org-latex-publish-to-latex | .tex file |
org-ascii-publish-to-ascii, org-ascii-publish-to-utf8 | Plain text |
org-md-publish-to-md | Markdown (load ox-md) |
org-org-publish-to-org | Cleaned-up Org file (load ox-org); with :htmlized-source t, also an htmlized copy of the source |
org-publish-attachment | Copy the file unchanged |
To offer every page as HTML and PDF:
:publishing-function (org-html-publish-to-html org-latex-publish-to-pdf)
You can write your own function. It receives three arguments: the project’s property list, the absolute name of the source file, and the publishing directory for this file. Most custom functions are thin wrappers around org-publish-org-to, the helper that the built-in functions use:
(defun my-publish-to-utf8-txt (plist filename pub-dir)
"Publish FILENAME as UTF-8 text with a .txt extension."
(org-publish-org-to 'ascii filename ".txt"
(plist-put plist :ascii-charset 'utf-8)
pub-dir))
Export options in a project
A project’s property list can carry any export option under its property name: :with-toc, :section-numbers, :with-author, :html-head, :html-postamble and so on. The site above used several of them to strip the default style and footer from every page. The full list of names is in the manual’s Publishing options node; every #+OPTIONS item and every backend variable has one.
The precedence follows the rule from Figure 15.1 in Exporting: the project plist is passed to the exporter as the external plist, so it overrides global variables, and keywords inside each file override the project. A page that needs a table of contents can therefore say #+OPTIONS: toc:t even though the project sets :with-toc nil.
Sitemaps
A sitemap is a generated page that lists all pages of a project. Turn it on with :auto-sitemap t. Org writes the list as an Org file (by default sitemap.org, or the name in :sitemap-filename) in the base directory and then publishes it like the other pages, so the sitemap gets the same style and can be linked from your home page.
For the site above, with :sitemap-style list and :sitemap-sort-files anti-chronologically, the generated sitemap.org is:
#+TITLE: All Pages
- [[file:index.org][Ada's Notebook]]
- [[file:posts/second-post.org][Second Post]]
- [[file:posts/first-post.org][First Post]]
- [[file:about.org][About]]
The order comes from each file’s date. org-publish-find-date uses the DATE keyword when it contains a timestamp and falls back to the file’s modification time otherwise. index.org has no DATE, so its modification time (today) put it first.
The properties that shape a sitemap are:
| Property | Values |
|---|---|
:sitemap-title | Title of the sitemap page |
:sitemap-style | tree (mirrors directories, the default) or list (flat) |
:sitemap-sort-files | alphabetically (default), chronologically, anti-chronologically, or nil |
:sitemap-sort-folders | first, last, ignore, or nil to mix; only for the list style |
:sitemap-ignore-case | Non-nil for case-insensitive sorting |
:sitemap-format-entry | Function that formats one entry |
:sitemap-function | Function that builds the whole page from the entries |
The global defaults are org-publish-sitemap-sort-files and org-publish-sitemap-sort-folders. Note that the variable org-publish-sitemap-sort-folders defaults to ignore in the 9.8.13 source, although the manual describes first as the default; set the property explicitly if folder placement matters to you.
Formatting entries
A blog-style list usually shows dates. :sitemap-format-entry takes a function of three arguments (the entry’s file name relative to the base directory, the style, and the project) and returns the text of one item. The helpers org-publish-find-title, org-publish-find-date and org-publish-find-property read metadata from the file, and org-publish-sitemap-default-entry provides the default behavior for directories:
(defun my-sitemap-entry (entry style project)
"Show the date before each page title in the site map."
(if (directory-name-p entry)
(org-publish-sitemap-default-entry entry style project)
(format "%s [[file:%s][%s]]"
(format-time-string "%Y-%m-%d" (org-publish-find-date entry project))
entry
(org-publish-find-title entry project))))
With this function and :sitemap-style tree, the sitemap becomes:
#+TITLE: All Pages
- 2026-11-19 [[file:theindex.org][Index]]
- 2026-11-19 [[file:index.org][Ada's Notebook]]
- 2026-10-01 [[file:about.org][About]]
- posts
- 2026-11-15 [[file:posts/second-post.org][Second Post]]
- 2026-11-02 [[file:posts/first-post.org][First Post]]
The posts directory became a nested list, and theindex.org, which existed by the time of this second run, now appears as an ordinary page. Exclude it with :exclude "theindex\\.org" if you do not want it listed. For full control over the page (a heading per year, an introduction paragraph), replace the whole generator with :sitemap-function; it receives the title and the entries as a nested list that org-list-to-org can turn into Org text.
An index across pages
With :makeindex t, Org collects every #+INDEX: keyword in the project into a single index page. An exclamation mark creates a sub-entry, so #+INDEX: Publishing!first steps appears under “Publishing”. Org writes the entries to theindex.inc and creates theindex.org (only if it does not exist yet), which merely includes it:
#+TITLE: Index
#+INCLUDE: "theindex.inc"
The generated theindex.inc for the example site:
* C
- [[file:about.org][Contact]]
* P
- Publishing
- [[file:posts/first-post.org][first steps]]
Since Org never overwrites theindex.org, you can edit it freely, for example to add an introduction or a different title. Org publishes it after all other files, because the include file must be complete first.
Preparation and completion
Two properties attach your own code to the start and end of a project:
:preparation-functionruns before any file is published. Use it to generate inputs: runmake, render diagrams, fetch data.:completion-functionruns after the last file. Use it to post-process or deploy: fix permissions, compress, upload.
Both accept a function or a list of functions, each called with the project’s property list. A trivial example:
(defun my-announce (plist)
(message "Finished %s into %s"
(file-name-nondirectory (directory-file-name (plist-get plist :base-directory)))
(plist-get plist :publishing-directory)))
With :completion-function my-announce, the log of a run ends with:
Finished org into .../site/public/
The order inside a project is fixed: preparation, sitemap, all files except the index, the index, completion.
flowchart TD
A["org-publish project"] --> B[":preparation-function"]
B --> C{"auto-sitemap?"}
C -->|yes| D["Write sitemap.org"]
C -->|no| E
D --> E{"For each file:<br/>changed since last run?"}
E -->|"yes, or force"| F[":publishing-function"]
E -->|no| G["Skip"]
F --> H{"makeindex?"}
G --> H
H -->|yes| I["Write theindex.inc, publish theindex.org"]
H -->|no| J[":completion-function"]
I --> J
Figure 16.2: Within one project, Org runs the preparation code, writes the sitemap, publishes only changed files, builds the index and finally runs the completion code.
Timestamps: publishing only what changed
Publishing a large site from scratch can take a while, so Org remembers when it last published each file. The records live in one cache file per project in org-publish-timestamp-directory (default ~/.org-timestamps/; the example moved it next to the project). On the next run, a file is published only if it is newer than its record.
A second run of the example site without changes, then a third run after appending a line to second-post.org, produce:
== run 2 (no change)
Generating sitemap for All Pages
Publishing file .../org/sitemap.org using 'org-html-publish-to-html'
Skipping unmodified file .../org/about.org
Skipping unmodified file .../org/posts/second-post.org
Skipping unmodified file .../org/posts/first-post.org
Skipping unmodified file .../org/index.org
Publishing file .../org/theindex.org using 'org-html-publish-to-html'
...
== run 3 (one edit)
Generating sitemap for All Pages
Publishing file .../org/sitemap.org using 'org-html-publish-to-html'
Skipping unmodified file .../org/about.org
Publishing file .../org/posts/second-post.org using 'org-html-publish-to-html'
Skipping unmodified file .../org/posts/first-post.org
Skipping unmodified file .../org/index.org
Publishing file .../org/theindex.org using 'org-html-publish-to-html'
...
The sitemap and the index are regenerated on every run, so they are always published; the ordinary pages are skipped unless they changed. Set org-publish-list-skipped-files to nil to hide the “Skipping” lines.
The check also looks inside each Org file for #+INCLUDE: keywords and compares the included files’ modification times. It does not follow #+SETUPFILE:. A quick test confirms both: after adding #+INCLUDE: "../parts/hours.txt" and #+SETUPFILE: ../parts/setup.org to about.org,
--- edit included file
Publishing file .../org/about.org using 'org-html-publish-to-html'
--- edit setupfile
Skipping unmodified file .../org/about.org
Other inputs that the cache cannot see include changes to publish.el itself, to global variables, and to files reached through links. Whenever such an input changes, force a full rebuild:
- with a prefix argument to any publishing command (
C-u C-c C-e P p), - with
C-finside the export dispatcher, ororg-export-force-publishingas its default, - with
tas theforceargument oforg-publishin Lisp, - or by setting
org-publish-use-timestamps-flagtonil, which disables the cache altogether.
org-publish-remove-all-timestamps deletes the cache files, which has the same effect for the next run.
Triggering publication
The publishing commands live under P in the export dispatcher:
| Keys | Command | Publishes |
|---|---|---|
C-c C-e P x | org-publish | A project chosen by name |
C-c C-e P p | org-publish-current-project | The project that contains the current file |
C-c C-e P f | org-publish-current-file | Only the current file |
C-c C-e P a | org-publish-all | Every project in org-publish-project-alist |
All four accept a prefix argument to force publishing. C-a in the dispatcher runs them asynchronously, like any export.
For a reproducible build, prefer the batch form. A Makefile rule might look like this:
EMACS ?= emacs
public: publish.el $(wildcard org/*.org org/posts/*.org)
$(EMACS) --batch -l publish.el --eval '(org-publish "site" t)'
Forcing in batch is usually the right choice: the cache lives outside the build’s inputs, so a clean build from a fresh checkout should not depend on it.
Uploading the result
The publishing directory may be remote. Any file name that Tramp understands works, for example "/ssh:user@host:~/html/", and Org then writes each file over the network. This is convenient for a few files but slow for many, and every small change still opens remote connections.
A local publishing directory plus a synchronization tool is usually faster and more reliable: tools such as rsync compare content and permissions, transfer only differences, and copy assets that are not part of any project. A completion function can run the upload right after publishing:
(defun my-upload (_plist)
"Copy the published site to the web server."
(let ((status (call-process "rsync" nil "*rsync*" nil
"-az" "--delete"
(expand-file-name "public/" my-root)
"user@example.org:/var/www/notes/")))
(unless (eq status 0)
(error "rsync failed with status %s; see buffer *rsync*" status))))
Attach it to the meta-project’s last component (here site-static), so that it runs once all files are in place. Since --delete removes remote files that no longer exist locally, try the command with --dry-run first.
Citations
Why citations are not links
A link points to exactly one target and displays whatever description you wrote. Academic writing needs more: a reference that is formatted according to a style (“Knuth (1984)”, “[1]”, a footnote), groups of references in one place, page numbers and prefixes such as “see”, and a bibliography that lists exactly the works cited. Org provides a separate citation syntax for this, and leaves the formatting to exchangeable citation processors.
The syntax
A citation is written in brackets, starts with cite, and contains one or more keys, each prefixed with @:
[cite:@knuth1984]
[cite:@knuth1984;@schulte2012]
[cite:see @schulte2012 p. 3; also @knuth1984]
[cite/t:@knuth1984]
- Keys are separated by semicolons.
- Text before a key is its prefix, text after it is its suffix (“see”, “p. 3”).
- A slash after
citeselects a style, such ast(text, for use inside a sentence) orauthor. Styles can have variants, as incite/author/caps. Which styles exist depends on the export processor. - A citation without a style uses the default style named in
#+CITE_EXPORT:, or the processor’s own default.
The bibliography itself is one or more files in BibTeX, BibLaTeX or CSL-JSON format. Declare them per document with #+BIBLIOGRAPHY: (repeat the keyword for several files), or for all documents with org-cite-global-bibliography. Mark where the reference list belongs with #+PRINT_BIBLIOGRAPHY:.
C-c C-x @ (org-cite-insert) inserts a citation with completion over the keys of all bibliographies; on an existing citation it edits it. C-c C-o on a citation follows it to the bibliography entry.
Processors and capabilities
Citation handling is split into four capabilities, and each one can use a different processor:
flowchart LR C["[cite:@key]"] --> A["activate<br/>org-cite-activate-processor"] C --> F["follow<br/>org-cite-follow-processor"] C --> I["insert<br/>org-cite-insert-processor"] C --> E["export<br/>org-cite-export-processors"] A -->|"faces, checks"| BUF[Org buffer] F -->|"C-c C-o"| BIB["Bibliography entry"] I -->|"C-c C-x @"| BUF E -->|"formatted text"| OUT["HTML, LaTeX, text ..."]
Figure 16.3: One citation is served by up to four processors: one for display, one for following, one for insertion, and one per backend for export.
The first three variables default to basic, the built-in processor that reads both BibTeX and CSL-JSON. Export processors are chosen per backend through org-cite-export-processors, whose default ((t basic)) uses basic everywhere. The built-in export processors are:
| Processor | Targets | Notes |
|---|---|---|
basic | All backends | Simple author-year or numeric formatting, no external dependencies |
csl | HTML, LaTeX, ODT, plain text | Formats with Citation Style Language files; requires the external citeproc package |
bibtex | LaTeX only | Uses BibTeX and \cite |
natbib | LaTeX only | Uses the natbib package for more citation commands |
biblatex | LaTeX only | Uses BibLaTeX and its citation commands |
A common setup uses BibLaTeX for LaTeX and PDF output and a portable processor for everything else:
(require 'oc-biblatex)
(setq org-cite-global-bibliography '("~/bib/references.bib")
org-cite-export-processors '((latex biblatex)
(t basic)))
The lookup respects backend inheritance: Beamer is derived from LaTeX, so it would also use biblatex here.
Inside a document, #+CITE_EXPORT: overrides the variable. It takes up to three words: the processor, the bibliography style and the default citation style.
#+CITE_EXPORT: basic numeric numeric
#+CITE_EXPORT: csl ieee.csl
#+CITE_EXPORT: biblatex authoryear
A worked example
refs.bib holds two entries, knuth1984 (a book) and schulte2012 (a journal article). The document:
#+TITLE: Notes on Literate Programming
#+OPTIONS: toc:nil num:nil author:nil date:nil title:nil
#+BIBLIOGRAPHY: refs.bib
The idea goes back to [cite/t:@knuth1984]. Org Babel applies it to
many languages [cite:see @schulte2012 p. 3; also @knuth1984].
#+PRINT_BIBLIOGRAPHY:
With the default basic processor, ASCII export gives:
The idea goes back to Knuth, Donald E. (1984). Org Babel applies it to
many languages (see Schulte, Eric and Davison, Dan and Dye, Thomas and
Dominik, Carsten, 2012 p. 3, also Knuth, Donald E., 1984).
Knuth, Donald E. (1984). /Literate Programming/, Oxford University
Press.
Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten
(2012). /A Multi-Language Computing Environment for Literate Programming
and Reproducible Research/, Journal of Statistical Software.
The t style put the author into the sentence, the plain citation became a parenthetical group with prefixes and suffix, and #+PRINT_BIBLIOGRAPHY: listed exactly the two cited works.
Adding #+CITE_EXPORT: basic numeric numeric switches both the citations and the bibliography to numbers:
The idea goes back to Knuth, Donald E. (1984). Org Babel applies it to
many languages (1, 2).
[1] Knuth, Donald E., /Literate Programming/, Oxford University Press,
1984.
[2] Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten,
/A Multi-Language Computing Environment for Literate Programming and
Reproducible Research/, Journal of Statistical Software, 2012.
The explicit t style still wins over the default numeric style for the first citation, while the second one became “(1, 2)”. The basic processor’s numeric style dropped the prefixes and the page number, so check the output when you rely on them. HTML export of the same file produces the same text, with <i> for titles.
With org-cite-export-processors set to ((latex biblatex) (t basic)), the LaTeX body becomes:
The idea goes back to \textcite{knuth1984}. Org Babel applies it to
many languages \autocites[see][p. 3]{schulte2012}[also][]{knuth1984}.
\printbibliography
Now the formatting is left to BibLaTeX; prefixes and suffixes survive as the optional arguments of \autocites. The same Org source thus produces a quick text or HTML version and a typeset PDF, each with references handled by the tool best suited to the format.
Bibliography options
#+PRINT_BIBLIOGRAPHY: may appear several times, and with the csl and biblatex processors it accepts options to print only part of the bibliography:
#+PRINT_BIBLIOGRAPHY: :type book
#+PRINT_BIBLIOGRAPHY: :keyword "literate programming" :nottype article
The biblatex processor passes the options to \printbibliography. The csl processor understands :keyword, :notkeyword, :type, :nottype, :csltype, :notcsltype and :filter (an Emacs Lisp predicate). The LaTeX-based processors print a section heading above the list, while basic and csl print only the entries.
Citations in a published site
Citations work in published projects without extra configuration, because publishing calls the same exporters. Two points need attention. First, relative paths in #+BIBLIOGRAPHY: are resolved against the directory of each source file. Either use one global bibliography, or put the keyword in a shared #+SETUPFILE:; Org adjusts relative bibliography paths that come from a setup file in another directory. Second, the timestamp cache does not watch .bib files; force a rebuild after you change the bibliography.
Summary
- A project in
org-publish-project-alistnames source files, a destination and a publishing function;:componentscombines projects. - Design the output tree first: published links are relative, and
.orglinks become.htmllinks. - Sitemaps (
:auto-sitemap) and indexes (:makeindex) are generated Org files that are published like any page. - Org republishes only changed files, including directly included files; force a full rebuild when other inputs change.
- Citations (
[cite:@key]) are formatted by processors chosen per backend, withbasicworking everywhere and the LaTeX processors handing the work to LaTeX tools.
Further reading
- Org manual, publishing: Publishing, Project alist, Sources and destinations, Selecting files, Publishing action, Publishing options, Publishing links, Site map, Generating an index, Uploading Files, Sample Configuration, Triggering Publication
- Org manual, citations: Citation handling, Citations, Citation export processors, Bibliography printing
- Source:
lisp/ox-publish.el(the docstring oforg-publish-project-alistlists every property;org-publish-projectsshows the order of steps),lisp/oc.el(citation framework) andlisp/oc-basic.el(the default processor and its styles)