npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ebook-cli

v1.6.1

Published

使用Markdown书写文档的工具

Downloads

6

Readme

简介

使用 Markdown 书写文档的工具

快速开始

npm i -g ebook-cli
ebook init [book-name]
cd [book-name]
ebook start

命令

#开启本地开发服务器,监控项目文件的变化,实时构建并自动刷新浏览器,浏览器访问 http://localhost:9001
ebook start

#在输出目录下生成静态页面
ebook build

#帮助
ebook help

SUMMARY.md

模板

---
name: myBook
version: 1.0.0
description: This is a book powered by [ebook-cli](http://192.168.101.103/coral/ebook-cli).
author: <a href=http://192.168.101.103/coral/ebook-cli target=_target>@ebook-cli</a>
---

//导航

# doc

//目录

* [Introduction](../README.md)
* [Start](start.md)

文件头信息

---
name: myBook // 书名
version: 1.0.0 // 版本号
description: This is a book powered by [ebook-cli](http://192.168.101.103/coral/ebook-cli). // 说明
keywords: doc,key //关键字
author: <a href=https://github.com/facebook/react/ target=_target>@hjb</a> // 作者,可以是html标签
favicon: http://xxx  // 快捷图标
logo: ./img/logo.png // logo, 相对路径
background: ./img/xxx.png // 首页背景图
notFound: ./img/xxx.png // 404页面
icon: book,home // 导航栏图标,以逗号分隔
navtitle: 指南,组件 // 导航栏标题,以逗号分隔
index: ./index.html // 起始页,默认为 ./index.html
pathname: ebook-cli // 访问路径
---

所有图标

例子

---
name: myBook
version: 1.0.0
description: This is a book powered by [ebook-cli](http://192.168.101.103/coral/ebook-cli).
author: <a href=https://github.com/facebook/react/ target=_target>@hjb</a>
logo: ./img/logo.png
icon: book,home
---

# doc

* [Introduction](../README.md)
* [Start](start.md)
  * [Qui](start/qui.md)
  * [CC](start/cc.md)
* [第一章](chapter1/README.md)
  * [第一节](chapter1/section1.md)
  * [第二节](chapter1/section2.md)
* [第二章](chapter2/README.md)
  * [第一节](chapter2/section1.md)
    * [第一节](chapter2/dd/section1.md)
    * [第二节](chapter2/dd/section2.md)
  * [第二节](chapter2/section2.md)
* [结束](end/README.md)

# doc2222

* [Introduction](README.md)
* [Start](start.md)
  * [Qui](start/qui.md)
  * [CC](start/cc.md)
* [第一章](chapter1/README.md)
  * [第一节](chapter1/section1.md)
  * [第二节](chapter1/section2.md)
* [第二章](chapter2/README.md)
  * [第一节](chapter2/section1.md)
  * [第二节](chapter2/section2.md)
* [结束](end/README.md)

配置文件

创建 book.json 文件

{
  ...

  "output": "./_site", // 输出目录
  "theme": "one",
  "plugins": ['toc?maxDepth=2&keepElem', 'sofa'],
  "template": "./.temp/template.html",
  "port": 9001, // 启动端口
  "root": "/"

  ...
};

在 md 文件中引用静态资源

把静态资源放入 ./assets 路径中

可以在配置文件中自定义 存放路径输出路径

{
  // 有两个参数
  // from: 存放静态资源的路径,默认'./assets'
  // to: 输出路径,默认'./_site'
  "plugins": ["copyAssets?from=./img"]
}

在 md 文件中:

<p style="text-align: center">
  <img src="./img/1.png" style="width: 100%" />
</p>

或

![screenshot](./img/1.png)
[类似这样](./img/app.json)

主题与插件

...

注意

  • 在一个项目中,存放 md 文件的目录不要有中文
  • md 文件名除了扩展名不要有 '.' 符号

vscode-ebook

todo

  • 丰富主题功能
  • 分离出 ebook-core
  • 模式:预设的配置
    • 文档模式
    • 项目模式
    • ...
  • vscode-ebook 体验