mriiiron / salvia

A minimum-building static blog framework.

Home Page:http://mriiiron.github.io/salvia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SalviaJS

A fast and easy blog framework featuring minimum building. Only metadata of posts need to be built. Posts in Markdown would be parsed on-the-fly.

Sage

Features

  • WYSIWYG, and forget about the time you wasted while generating massive number of posts.
  • Parser based on CommonMark, with more features extended.
  • Provided salvia-cli for easy blogging. Get

Quick Start

Via npm (recommended)

Install CLI:

$ npm install -g salvia-cli

Start your blog in "myblog" folder:

$ salvia init myblog

You're all set.

Manually

Follow Full Guide to set up proper folder structure and create your main page, post page, archive, page, etc.

In your page, link script:

<script src="./js/salvia.min.js"></script>

Construct the container div:

<div id="blog"></div>

And construct the blog into the container:

let blog = new Salvia({
    el: "#blog",
    main: {
        type: "feed",
        pagination: {
            limit: 5,
            page: Salvia.util.getUrlParamValue("page") || 1
        }
    },
    widgets: [
        {
            title: "TABLE OF CONTENTS",
            type: "recentPosts"
        },
        {
            title: "TAG CLOUD",
            type: "tagCloud"
        }
    ]
});

To-do

  • SalviaFeed (with pagination)
  • SalviaPost
  • SalviaArchives
  • SalviaPostListWidget
  • SalviaCategoryListWidget
  • SalviaTagCloudWidget

License

MIT

About

A minimum-building static blog framework.

http://mriiiron.github.io/salvia

License:MIT License


Languages

Language:JavaScript 74.0%Language:CSS 13.8%Language:HTML 11.5%Language:Shell 0.7%