Awesome
<h1 align="center"> boowa </h1> <p align="center"><strong> <img src="https://avatars2.githubusercontent.com/u/34954489?s=200&v=4" width="25px"/> = a fun blog generator </strong></p> <br /> <div align="center"> <!-- Stability --> <a href="https://img.shields.io/badge/stability-stable-green.svg?style=flat-square"> <img src="https://img.shields.io/badge/stability-stable-green.svg?style=flat-square" alt="API stability" /> </a> <!-- travis ci --> <a href="https://img.shields.io/travis/boowajs/boowa.svg?style=flat-square"> <img src="https://img.shields.io/travis/boowajs/boowa.svg?style=flat-square" alt="test status" /> </a> <!-- npm version --> <a href="https://img.shields.io/npm/v/boowa.svg?style=flat-square"> <img src="https://img.shields.io/npm/v/boowa.svg?style=flat-square" alt="npm version" /> </a> <!-- code style --> <a href="https://img.shields.io/badge/code%20style-standard-blue.svg?style=flat-square"> <img src="https://img.shields.io/badge/code%20style-standard-blue.svg?style=flat-square" alt="code style: standard" /> </a> <a href="https://img.shields.io/npm/dm/boowa.svg?style=flat-square"> <img src="https://img.shields.io/npm/dm/boowa.svg?style=flat-square" alt="code style: standard" /> </a> </div> <br />Table of Contents
Themes
Let's see some boowa blogs first, will add more themes later:
Features
- colorful: provide kinds of styles to take your fancy
- simple: few tips to play your blog
- support offline: keep reading even if there's no wifi
- very modern: works very well with async functions (node 7.6+)
- fast as lightning: it takes almost no time to generate a blog!
Quick Start
- Install boowa globally
npm install boowa -g
- Make a directory to generate your blog
mkdir myBlog && cd myBlog
boowa
-
Select one style from the inquiring list
-
Start a development server
npm run start
Why my name is boowa
boowa is built with:
- bankai - 🚉 - friendly web compiler
- choo - 🚂 4kb framework for creating sturdy frontend applications
- awoo - 🔸 declarative small site generator
so, boowa
API
boowa
Generate a new blog app in a empty directory
app structure
<img src="https://github.com/boowajs/boowa/blob/master/pics/structure.png" width="150px">Actually a choo app yeah~, but you only need to handle markdown files and _config.json
boowa create
<img src="https://github.com/boowajs/boowa/blob/master/pics/create.png" width="350px">
Run this command to generate a new markdown file contains the necessary structure, and it will build the html file automatically:
<img src="https://github.com/boowajs/boowa/blob/master/pics/sub_stru.png" width="150px">⚠️ Put content in markdown-body
:
_config.json
This file contains metadatas like name, email etc.
boowa build
After edit _config.json
or modify markdown files, run this command to generate new templates.
npm run start
Start a development server
npm run build
Compile all files to dist/
boowa serve <port | 8080>
Boowa has a simple built-in server , after npm run build && cd dist
, run this command to serve the production code.
update the newest code
After install the newest boowa, run boowa
in the boowa-existed directory, this update would not rewrite the markdown files and _config.json
.
support offline locally
Service-worker works under https in production mode, so if you want to test the offline function locally, for chrome, run this command first:
/Applications/Google\ Chrome.app/Conts/MacOS/Google\ Chrome --user-data-dir=/tmp/foo --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=http://localhost:port
You will see ServiceWorker registration successful with scope: http://localhost:port/
in the developer tool, if service-worker register successfully.