org-mode-lucid-1.0.1

Copyright(c) Colin Woodbury 2020
LicenseBSD3
MaintainerColin Woodbury <colin@fosskers.ca>
Safe HaskellNone
LanguageHaskell2010

Data.Org.Lucid

Contents

Description

This library converts OrgFile values into Html structures from the Lucid library. This allows one to generate valid, standalone HTML pages from an Org file, but also to inject that HTML into a preexisting Lucid Html structure, such as a certain section of a web page.

Synopsis

HTML Conversion

Consider defaultStyle as the style to pass to these functions.

html :: OrgStyle -> OrgFile -> Html () Source #

Convert a parsed OrgFile into a full HTML document readable in a browser.

body :: OrgStyle -> OrgFile -> Html () Source #

Convert a parsed OrgFile into the body of an HTML document, so that it could be injected into other Lucid Html structures.

Does not wrap contents in a <body> tag.

Styling

data OrgStyle Source #

Rendering options.

Constructors

OrgStyle 

Fields

  • includeTitle :: Bool

    Whether to include the #+TITLE: ... value as an h1 tag at the top of the document.

  • tableOfContents :: Maybe TOC

    Optionally include a Table of Contents after the title. The displayed depth is configurable.

  • bootstrap :: Bool

    Whether to add Twitter Bootstrap classes to certain elements.

defaultStyle :: OrgStyle Source #

Include the title and 3-level TOC named Table of Contents, and don't include Twitter Bootstrap classes. This mirrors the behaviour of Emacs' native HTML export functionality.

data TOC Source #

Options for rendering a Table of Contents in the document.

Constructors

TOC 

Fields