docpad-plugin-orgmode

2.0.3 • Public • Published

OrgMode Plugin for DocPad

NPM version

Convert documents written in org-mode to HTML

Convention: .html.org

Uses org-js to do the actual conversion

Install

docpad install orgmode

Using

Just create a document with the ending .html.org and start editing (Remark: for editing you will probably want to use GNU Emacs or one of its derivatives as org-mode-files are not much fun to edit without that mode).

A file would look like this:

---
title: "Test with org-mode"
layout: "default"
---
* First Section
  Some text
* *Important* section
  More text

If in the main section a #+TITLE: is set it overrides the title in the header. Otherwise the title is used to set the org-mode-title

Text between #begin_HTML and #end_HTML is passed directly to the generated HTML

Configuration

Options can either be passed in the header in an orgmode-section like this:

---
title: "Test-file"
orgmode:
  showTitle: false
---

Or in the docpad.coffee-file as global presets:

docpadConfig = {
plugins:
  orgmode:
    headerOffset: 1
}

Available options are:

  • showToc: Show the table of contents created by the parser. Default: true
  • showTitle: Show the title as a <h1> header. Default: true
  • headerOffset: Parameter from org-js. Increment the header levels by this. Default: 1
  • exportFromLineNumber: Parameter from org-js. Adds line numbers from the original source. Default: false
  • suppressSubScriptHandling: Parameter from org-js
  • suppressAutoLink: Parameter from org-js
  • suppressCheckboxHandling: Parameter from org-js. Do not translate checkboxes. Default: false
  • translateSymbolArrow: Parameter from org-js. Translate the characters -> to an arrow-symbol. Default: false
  • htmlClassPrefix: Parameter from org-js. Add this string to class names. For instance the class section-number is extended to org-js-section-number if this is set to org-js-. If you want to add a class make sure that the string ends with a white-space. Default: unset
  • htmlIdPrefix: Parameter from org-js. Prefix the IDs with this string. Default: unset

History

You can discover the history inside the History.md file

License

Licensed under the incredibly permissive MIT License

Copyright © 2014+ Bernhard F.W. Gschaider

Package Sidebar

Install

npm i docpad-plugin-orgmode

Weekly Downloads

2

Version

2.0.3

License

none

Last publish

Collaborators

  • bgschaid