cmx2

3.2.0 • Public • Published

cmx

pronounced camux

Prerequisites

Before using cmx you need

  • A src folder containg the files that you want to host
  • A views folder containing a pug template (called page.pug)
  • A .cmx.js file. Here's an example that renders markdown using [marked]
        module.exports = {
            "build": [{
                "match": [/\.html?$/i]
            }, {
                "match": [/\.md$/i, /\.markdown$/i],
                "transformers": [
                    // Any jstransformer module
                    {"name": "markdown-it"}
                ]
            }]
        }

Usage

Run cmx in the site folder`

Useful hints

  • Remember to put a template into the front matter
  • You can use YAML front matter to pass data to the template (e.g. Meta tags, the page title)
    ---
    title: Page title
    template: page
    ---
    content content content
  • Files that are not copiled are copied verbatim to the dist directory

Readme

Keywords

Package Sidebar

Install

npm i cmx2

Weekly Downloads

1

Version

3.2.0

License

MIT

Unpacked Size

25.9 kB

Total Files

9

Last publish

Collaborators

  • zsty