Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlyonsmith/markdown-book
A tool for creating books from a collection of Markdown files
https://github.com/jlyonsmith/markdown-book
Last synced: 6 days ago
JSON representation
A tool for creating books from a collection of Markdown files
- Host: GitHub
- URL: https://github.com/jlyonsmith/markdown-book
- Owner: jlyonsmith
- License: mit
- Created: 2019-08-11T23:19:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T06:54:53.000Z (almost 2 years ago)
- Last Synced: 2024-04-26T04:22:04.366Z (7 months ago)
- Language: JavaScript
- Size: 781 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdown Book
A tool for making books, whitepapers, essays and other long documents out of a collection of Markdown files. It can:
- Collate multiple Markdown files into one document in the process
- Adjusting all heading depths
- Optionally adding section numbering
- Add an indented table of contents (TOC)
- Generate a PDF or just a bigger Markdown file## Installation
Install the tool with:
```Shell
npm install markdown-book
```or run it with:
```Shell
npx markdown-book
```## Using It
Create a [JSON5]() document containing:
```json5
{
title: "A Book About Nothing",
toc: true,
number: true,
files: ["./part1.md", "./part2.md", "./part3.md"],
}
```- `title` will be the top level, single `#`, for the book.
- `toc` if `true` will include a table of contents after the title.
- `number` if `true` will insert a section number in all headings in the format *1.1.1*, separated by a colon `:`.
- `files` is an array of files relative to the `.json5` file.The tool expects [ATX headings](https://github.github.com/gfm/#atx-headings) (leading `#`'s). If you have [Setext headings](https://github.github.com/gfm/#setext-heading) (`-` or `=` underlines) they will be ignored.
Any images that are references by local file paths will be adjusted to the new relative path to the image from the output `.md` file. URL image references will not be modified.