Awesome Open Source
Awesome Open Source

Pagine

Client-side markdown website generator

License npm version API stability API stability


Pagine is a light-weight (~ 2.7 Kb gzipped) system to create multipage, content driven SPAs. Your content is loaded from markdown files and displayed on defined application routes. Pagine is great for documentation, blogs, and other text heavy websites.

Features

  • Page generation from markdown files
  • No server logic - 100% client side
  • Performant template caching
  • Built-in hash router

Installation

via npm

npm install pagine --save

via yarn

yarn add pagine

via download

<script src="path/to/pagine.min.js"></script>

Usage

JavaScript

import Pagine from 'pagine'

new Pagine({
  view: '#view',
  routes: [
    {
      path: '/home',
      md: './markdown/home.md',
      layout: 'main'
    }
  ]
})

HTML

<div id="view"></div>
<script type="text/html" id="main">
  <%= content %>
</script>

Routing

Pagine is currently setup to use hash routes (i.e. #/, #/docs).

Contributing

You can request a new feature by submitting an issue. If you would like to implement a new feature feel free to issue a Pull Request.

License

MIT License


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,510,014
Markdown (6,603
Npm Package (2,751
Single Page App (662
Website Builder (137
Related Projects