~hacktivista/tilt-emacs_org

Native Emacs Org Mode for Ruby Tilt
Loosen dependency constraints
Fix: Ignore emacs *Messages* + Fix: :body_with_resources option.
Initial commit. Working Tilt::EmacsOrg

clone

read-only
https://git.sr.ht/~hacktivista/tilt-emacs_org
read/write
git@git.sr.ht:~hacktivista/tilt-emacs_org

You can also use your local clone with git send-email.

#Tilt::EmacsOrg

A native Org Mode parser for Tilt.

#Installation

  1. Install emacs
  2. Install the tilt-emacs_org gem
  3. Done! Now Tilt has native Emacs Org support

#Usage

require 'tilt/emacs_org'
template = Tilt.new('file.org', 1, { setupfile: 'setup.org' })
template.title # document title
template.head # scripts, links and styles on head
template.render # body of HTML document

This is an example usage, render can vary depending on options. All options are optional.

#Options

#:format => :body_only|:body_with_resources|:full

Defaults to :body_only.

  • :body_only renders body only, discarding head section of the document.
  • :body_with_resources renders body with head script, link and style elements on top of the rest of the body.
  • :full renders a full HTML document, just as emacs exports it.

You can always access head script, link and style elements by calling EmacsOrgTemplate#head, and document title by calling EmacsOrgTemplate#title.

#:setupfile

If set, include a #+SETUPFILE on top of the document. Useful for default options.

#Contributing

Source code is available on https://git.hacktivista.org/tilt-emacs_org.

Bug reports and patches are welcome on https://lists.hacktivista.org/hacktivista-dev.

#License

The gem is available as libre software under the terms of the MIT License.