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

@sdoc/cli

v1.0.10

Published

San document creater.

Downloads

4

Readme

san-docit

基于 San 的极简静态站点生成器

介绍

SDoc 由两部分组成:第一部分是一个极简静态网站生成器,它包含由 San 驱动的主题系统和插件 API,另一个部分是为书写技术文档而优化的默认主题,它的诞生初衷是为了支持 San 及其子项目的文档需求。

每一个由 SDoc 生成的页面都带有预渲染好的 HTML,也因此具有非常好的加载性能和搜索引擎优化(SEO)。同时,一旦页面被加载,San 将接管这些静态内容,并将其转换成一个完整的单页应用(SPA),其他的页面则会只在用户浏览到的时候才按需加载。

快速上手

前提条件

SDoc 需要 Node.js (opens new window)>= 8.6

本文会帮助你从头搭建一个简单的 SDoc 文档。如果你想在一个现有项目中使用 SDoc 管理文档,从步骤 3 开始。

  1. 创建并进入一个新目录
mkdir sdoc-starter && cd sdoc-starter
  1. 使用你喜欢的包管理器进行初始化
yarn init # npm init
  1. 将 SDoc 安装为本地依赖

我们已经不再推荐全局安装 SDoc

yarn add -D @sdoc/cli # npm install -D @sdoc/cli

注意

如果你的现有项目依赖了 webpack 3.x,我们推荐使用 Yarn 而不是 npm 来安装 SDoc。因为在这种情形下,npm 会生成错误的依赖树。

  1. 创建你的第一篇文档
mkdir docs && echo '# Hello SDoc' > docs/README.md
  1. 在 package.json 中添加一些 scripts

这一步骤是可选的,但我们推荐你完成它。在下文中,我们会默认这些 scripts 已经被添加。

{
  "scripts": {
    "docs:start": "sdoc start docs",
    "docs:build": "sdoc build docs"
  }
}
  1. 在本地启动服务器
yarn docs:start # npm run docs:start

SDoc 会在 http://localhost:8080 启动一个热重载的开发服务器。

现在,你应该已经有了一个简单可用的 SDoc 文档。接下来,了解一下推荐的 目录结构 和 SDoc 中的 基本配置