Home
Softono
pagine

pagine

Open source MIT JavaScript
17
Stars
2
Forks
2
Issues
2
Watchers
8 years
Last Commit

About pagine

✨ Client-side markdown website generator

Platforms

Web Self-hosted

Languages

JavaScript

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