Skip to content

ssebastianj/asciidoctor-chrome-extension

 
 

Repository files navigation

Asciidoctor Chrome Extension

This project uses Asciidoctor.js to preview AsciiDoc as HTML inside the Chrome (or Chromium) web browser!

ChromeWebStore Badge v2 206x58

Project health: Build Status

Usage

  1. Install extension from Chrome Web Store

  2. Check Allow access to file URLs in chrome://extensions

  3. Open local or remote .ad, .adoc, .asc, .asciidoc file in Chrome

  4. Enjoy!

Warning
Due to a Chromium bug the Allow access to file URLs is lost on extension update. If preview of local files isn’t working, make sure to uncheck and recheck the Allow access to file URLs.

Installation

Loading your local copy of the extension on Chrome is super easy:

  1. Check Developer mode in chrome://extensions

  2. Click Load unpacked extension…​ and select the extension app directory

  3. That’s all

To see your changes, click the Reload (Ctrl+R) link in chrome://extensions. If you want to create a Pack extension just make a zip file of the extension app directory.

Options

The extension can be configured via an options page.

To open the options page, right-click the extension icon and choose Options on the menu. You can also go to chrome://extensions and click the Options link.

The options page let you add custom Asciidoctor attributes or change the theme of the AsciiDoc HTML output.

Troubleshooting

TOC

It’s important to note that since the Chrome extension converts the document to embeddable HTML (header and footer disabled), the only TOC placement that work are preamble (if the document has a preamble) or manual placement.

toc-preambule.adoc
= Title
:toc: preamble
toc-manual-placement.adoc
= Title
:toc:
:toc-placement!:

Somewhere...
toc::[]

You can also use preprocessor directives to fine-tune the content to put the TOC in the right place depending on the environment.

Changelog

1.5.4.100

  • Asciidoctor 1.5.4

  • Font Awesome 4.5.0

  • MathJax 2.6.0

1.5.2.120

  • Chart extension

    Line chart
    [chart,line]
    ....
    January,February,March
    28,48,40
    65,59,80
    ....
  • Emoji extension

    Large heart emoji
    emoji:heart[lg]
  • Allow attributes to be defined via URL parameters

    Set TOC placement to preamble

    ?toc=preamble

  • Add tip about enabling local file access to options page

1.5.2.111

  • Support embedded videos

  • Fix enable/disable on local files

  • Font Awesome 4.3.0

1.5.2.100

  • Asciidoctor 1.5.2

  • Support :max-width: attribute

  • Offline mode

  • .txt files extension (configurable)

1.5.1.100

  • Asciidoctor 1.5.1

  • Fade navigation to enable sections as slides (contrib)

1.5.0.100

  • Asciidoctor 1.5.0 !

  • New stylesheet with Open Source Fonts

  • Better print styles

  • Font Awesome 4.1

  • MathJax support

  • Allow custom Javascript and Stylesheet

0.4.0

  • Upgrade to Asciidoctor 1.5.0-preview.8

  • Activate includes!

  • Render selection

  • Match URLs that contain a query string

0.3.0

  • Upgrade to Asciidoctor 1.5.0.preview.1

  • Add integration with Font Awesome 3.2.1

0.2.5

  • Add configuration option for specifying custom attributes

  • Allow to change the theme of AsciiDoc HTML output

0.2.4

  • Add highlight.js for syntax highlighting

  • Add context menu to send the "browser content" to the Asciidoctor Editor

0.2.3

  • Auto reload, you don’t need to refresh your browser anymore!

  • Shiny icon in chrome://extensions/

  • Support .asc file extension (thanks @mojavelinux)

Copyright © 2013 Guillaume Grossetie. Free use of this software is granted under the terms of the MIT License.

See the LICENSE file for details.

About

An extension for Google Chrome (& Chromium) that converts AsciiDoc files to HTML directly in the browser using Asciidoctor.js.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 92.8%
  • JavaScript 5.9%
  • HTML 1.2%
  • Shell 0.1%