Skip to content

wa-lang/wabook

Repository files navigation

waBook: Create book/talk from markdown files.

简体中文 | English

Build Status GitHub release license

Features

  • Create book from Markdown
  • Create slide from Markdown
  • Create book discuss based on Github Discuss
  • Supports custom header/footer

Example

Book list built using waBook:

Install

$ go install github.com/wa-lang/wabook@latest

命令行

$ wabook
NAME:
   wabook - A tool for build mini markdown book

USAGE:
   wabook [global options] command [command options] [arguments...]

COMMANDS:
   init   Creates a new book
   build  Builds a book from its markdown files
   serve  Serves a book at http://localhost:3000
   clean  Deletes a built book

GLOBAL OPTIONS:
   --help, -h  show help

 See "https://github.com/wa-lang/wabook" for more information.
  • init: Initialize a basic version of Book
  • build: Build the Markdown Book into html
  • serve: Build and start the service to facilitate local viewing of the effect
  • clean: Delete the built book subdirectory

book.ini file

No annotations supported, no undefined properties supported:

[book]
authors = ["chai2010"]
description = ""
language = "zh"
src = "."
title = "book title"

[output.html]
git-repository-icon = "fa-github"
git-repository-url = "https://github.com/wa-lang/wabook"
edit-url-template = "https://github.com/wa-lang/wabook/edit/master/testdata/{path}"

SUMMARY.md file

# Summary

[Preface](preface.md)

- [Chapter 1](./src/chapter_1.md)
  - [Chapter 1.1](./src/chapter_1.1.md)
  - [Chapter 1.2](./src/chapter_1.2.md)

- [Chapter 2](./src/chapter_2.md)

<!-- comment -->

Markdown file

# Chapter 1

[Github Repo](https://github.com/wa-lang/wabook): `[Github Repo](https://github.com/wa-lang/wabook)`


Image: `![](../images/video-001.png)`:

![](../images/video-001.png)

OK!

Do not support inline HTML。