GithubHelp home page GithubHelp logo

breuleux / quaint Goto Github PK

View Code? Open in Web Editor NEW
33.0 5.0 0.0 3.07 MB

The Quaint markup language

Home Page: http://breuleux.github.io/quaint/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 6.55% CSS 6.35% q 87.10%
markup-language quaint

quaint's Introduction

Quaint

Join the chat at https://gitter.im/breuleux/quaint

Quaint is a markup language similar to Markdown, but more regular and easier to customize.

Website

Quaint is written in Earl Grey

Install

npm install quaint -g

Once installed, you can run quaint in a new directory to set up a project. Plugins can be installed locally and configured with the following command:

quaint --setup plugin-name

Usage documentation

Syntax

Syntax

Plugins

List of plugins

Command-line

Usage: quaint <file ...> [options]

Options:
  -c, --config          Path to a configuration file with option values (must be
                        JSON)                           [default: "quaint.json"]
  -d, --data            JSON string or file(s) defining field:value pairs to be
                        made available inside markup (as {field}):
                        * key:value
                        * {"key": value, ...}
                        * filename.json
                        * prefix::filename.json
  -e, --eval            Quaint string to parse directly
  -f, --format          Format (only html currently supported)
  -h, --help            Show help                                      [boolean]
  --inline              Inline resources in the HTML
  -o, --out             File or directory to save the output to
  -p, --plugin          Plugin(s) to import:
                        * Quaint file (injected at the beginning)
                        * Path to JavaScript file
                        * Local npm module
                        * Global npm module
  -r, --resources       Directory where to put the resources
  --resources-url       URL for the resources directory
  --serve               Start server on specified port, in output directory
                                                                [default: false]
  -s, --stdout          Print to standard out         [boolean] [default: false]
  -t, --template        Name of the default template to use
  --template-directory  Template directory
  -v, --verbose         Print information about the operations performed
                                                                       [boolean]
  --setup               Set up and configure a plugin.          [default: false]
  -w, --watch           Watch for changes to rebuild            [default: false]

API

Simple usage:

var quaint = require("quaint");
quaint.toHTML("Hello _italic __[bold words].");
// ==> "Hello <i>italic</i> <b>bold words</b>"

Extend with plugins:

var quaint = require("quaint");
var qhl = require("quaint-highlight");
q = quaint(qhl({defaultLanguage: "python"}))
q.toHTML("&\n  def python_function():\n    return 1234");
// ==> code block for python_function highlighted in Python

quaint's People

Contributors

breuleux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.