Skip to content

Commit

Permalink
docs: Document org-transclusion-html
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmturner committed Mar 30, 2024
1 parent cd84129 commit f30a8dc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/org-transclusion-manual.org
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,24 @@ Example 5:
#+transclude: [[./things-at-point-dir/baz.el::id:1234567890][barz-baz-fuzz]] :src elisp :thingatpt defun
#+end_example

*** Transclude HTML content with Pandoc
#+cindex: Transclude HTML content with Pandoc

If you have Pandoc installed, you can transclude local HTML files
as Org documents.

This feature is provided as an [[#extensions][extension]] (default off).

#+begin_example
#+transclude: [[file:../test/source-html-no-ext]]
#+end_example

Since it's not currently possible to add anchor links to local =file:=
Org links, HTML transclusions always render the entire document as
Org. However, packages which transclude HTML documents over a
network, such as [[https://git.sr.ht/~ushin/hyperdrive.el][hyperdrive.el]] and [[https://git.sr.ht/~breatheoutbreathein/org-transclusion-http][org-transclusion-http]], are able to
render specific HTML elements by tag.

** Extensions
:PROPERTIES:
:CUSTOM_ID: extensions
Expand All @@ -550,6 +568,7 @@ Example 5:
#+cindex: Extension - org-transclusion-indent-mode
#+cindex: Extension - org-transclusion-src-lines
#+cindex: Extension - org-transclusion-font-lock
#+cindex: Extension - org-transclusion-html

Org-transclusion provides a simple extension framework, where you can use ~customize~ to selectively add new features.

Expand Down Expand Up @@ -577,6 +596,9 @@ Currently, the following extensions are available.
- (on by default) ~org-transclusion-font-lock~ ::
Add font-lock for =#+transclude=. Org mode's standard syntax treats the combination of a =#+transclude:= keyword and a link used by Org-transclusion as a keyword. This means it applies the ~org-meta-line~ face and the link part cannot be toggled as a normal link. This extension adds ~org-transclusion-keyword~ face to the keyword part and lets the link part to be treated as a normal link for ~org-toggle-link-display~.

- (off by default) ~org-transclusion-html~ ::
Transclude local HTML files by converting them to Org with Pandoc.

* Customizing

#+vindex: org-transclusion-extensions
Expand Down

0 comments on commit f30a8dc

Please sign in to comment.