跳到主要内容

docs

· 阅读需 11 分钟

Astro

  • Static site generator
  • JavaScript frameworks
  • Open-source software
  • Visit astro.build

Astro is a new JavaScript-based static site builder.

(base) mjl@ubuntu:~/work/mjl2020$ nvm list
v8.17.0
v14.21.3
v16.19.1
-> v19.6.1
default -> v14.21.3
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v19.6.1) (default)
stable -> 19.6 (-> v19.6.1) (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3
lts/gallium -> v16.20.0 (-> N/A)
lts/hydrogen -> v18.16.0 (-> N/A)
(base) mjl@ubuntu:~/work/mjl2020$ nvm install 18.16.0
Downloading and installing node v18.16.0...
Downloading https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-x64.tar.xz...
#################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v18.16.0 (npm v9.5.1)
(base) mjl@ubuntu:~/work/mjl2020$ nvm use 18.16.0
Now using node v18.16.0 (npm v9.5.1)
(base) mjl@ubuntu:~/work/mjl2020$ npm create astro@latest

╭─────╮ Houston:
│ ◠ ◡ ◠ Awaiting further instructions.
╰─────╯

astro v3.0.8 Launch sequence initiated.

dir Where should we create your new project?
./astro-sample

tmpl How would you like to start your new project?
Include sample files
✔ Template copied

deps Install dependencies?
Yes
██████ Installing dependencies with npm...
▲ error Error: Timeout
✔ Dependencies installed

ts Do you plan to write TypeScript?
No
◼ No worries! TypeScript is supported in Astro by default,
but you are free to continue writing JavaScript instead.

git Initialize a new git repository?
Yes
✔ Git initialized

next Liftoff confirmed. Explore your project!

Enter your project directory using cd ./astro-sample
Run npm run dev to start the dev server. CTRL+C to stop.
Add frameworks like react or tailwind using astro add.

Stuck? Join us at https://astro.build/chat

╭─────╮ Houston:
│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀
╰─────╯
(base) mjl@ubuntu:~/work/mjl2020$ cd astro-sample/
(base) mjl@ubuntu:~/work/mjl2020/astro-sample$ npm run dev

> astro-sample@0.0.1 dev
> astro dev

◆ Astro collects completely anonymous usage data.
This optional program helps shape our roadmap.
Run `npm run astro telemetry disable` to opt-out.
Details: https://astro.build/telemetry

🚀 astro v3.0.8 started in 122ms

┃ Local http://localhost:4321/
┃ Network use --host to expose

Docusaurus

Docusaurus is a tool for teams to publish documentation websites.

Docusaurus 是 Facebook 专门为开源项目开发者提供的一款易于维护的静态网站创建工具,使用 Markdown 即可更新网站。构建一个带有主页、文档、API、帮助以及博客页面的静态网站,只需5分钟。

Docusaurus 是一个静态站点生成器。它构建了一个具有快速客户端导航的单页应用程序,利用React的全部功能使您的站点具有交互性。它提供开箱即用的文档功能,但可用于创建任何类型的网站(个人网站、产品、博客、营销登录页面等)。

Jekyll

Jekyll is a blog-aware, static site generator for personal, project, or organisation sites.

Jekyll is one of the most mature static site generators around and has been a great tool to use — in fact, before Docusaurus, most of Facebook's Open Source websites are/were built on Jekyll! It is extremely simple to get started. We want to bring a similar developer experience as building a static site with Jekyll.

In comparison with statically generated HTML and interactivity added using <script /> tags, Docusaurus sites are React apps. Using modern JavaScript ecosystem tooling, we hope to set new standards on doc sites' performance, asset building pipeline and optimizations, and ease to set up.

Docsify / Docute

Docsify makes it easy to create a documentation website, but is not a static-site generator and is not SEO friendly.

这两个项目同样都是基于 Vue,然而它们都是完全的运行时驱动,因此对 SEO 不够友好。如果你并不关注 SEO,同时也不想安装大量依赖,它们仍然是非常好的选择!

docz

https://www.docz.site/

https://github.com/doczjs/docz

  • Powered by Gatsby
  • Zero config
  • Easy to customize
  • Based on MDX
  • Fully pluggable
  • TypeScript support

Eleventy

  • Static site generator
  • Open-source software
  • Visit 11ty.dev

Eleventy (11ty) a simpler static site generator.

Gatsby

https://www.gatsbyjs.com/

Gatsby is packed with a lot of features, has a rich ecosystem of plugins, and is capable of doing everything that Docusaurus does. Naturally, that comes at a cost of a higher learning curve. Gatsby does many things well and is suitable for building many types of websites. On the other hand, Docusaurus tries to do one thing super well - be the best tool for writing and publishing content.

GraphQL is also pretty core to Gatsby, although you don't necessarily need GraphQL to build a Gatsby site. In most cases when building static websites, you won't need the flexibility that GraphQL provides.

Many aspects of Docusaurus 2 were inspired by the best things about Gatsby and it's a great alternative.

Docz is a Gatsby theme to build documentation websites. It is currently less featured than Docusaurus.

GitBook

我们的子项目文档一直都在使用 GitBook。GitBook 最大的问题在于当文件很多时,每次编辑后的重新加载时间长得令人无法忍受。它的默认主题导航结构也比较有限制性,并且,主题系统也不是 Vue 驱动的。GitBook 背后的团队如今也更专注于将其打造为一个商业产品而不是开源工具。

GitBook has a very clean design and has been used by many open source projects. 但随着它把重点逐渐从开源工具转向商业产品,它不再符合开源项目文档网站的需要。 结果就是,许多项目转用了其他产品。

目前,GitBook 只对开源和非营利团队免费。

Gridsome

Gridsome is a free and open-source Vue-powered static site generator for building static websites.

Hexo

  • Static site generator
  • Visit hexo.io

Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown(或其他标记语言)解析文章,在几秒内,即可利用靓丽的主题生成静态网页。

  • 超快速度
    • Node.js 所带来的超快生成速度,让上百个页面在几秒内瞬间完成渲染。
  • 支持 Markdown
    • Hexo 支持 GitHub Flavored Markdown 的所有功能,甚至可以整合 Octopress 的大多数插件。
  • 一键部署
    • 只需一条指令即可部署到 GitHub Pages, Heroku 或其他平台。
  • 插件和可扩展性
    • 强大的 API 带来无限的可能,与数种模板引擎(EJS,Pug,Nunjucks)和工具(Babel,PostCSS,Less/Sass)轻易集成

Hexo 一直驱动着 Vue2.x 的文档 —— 事实上,在把我们的主站从 Hexo 迁移到 VuePress 之前,我们可能还有很长的路要走。Hexo 最大的问题在于他的主题系统太过于静态以及过度地依赖纯字符串,而我们十分希望能够好好地利用 Vue 来处理我们的布局和交互,同时,Hexo 的 Markdown 渲染的配置也不是最灵活的。

Hugo

https://github.com/mitrichius/hugo-theme-anubis

Lume

  • Static site generator
  • Open-source software
  • Visit lume.land

Lume is a static site generator based on Deno.

MkDocs

  • Python

MkDocs 是一个基于 Python 的静态站点生成器,专为项目文档而设计。它将 Markdown 文件转换为 HTML,具有简洁的界面和多个可定制的主题。MkDocs 可以轻松地集成到各种 CI/CD 工作流程中,支持多种插件,以增强其功能。

官方网站:https://www.mkdocs.org/

MkDocs is a popular Python static site generator with value propositions similar to Docusaurus.

如果你不需要单页应用,也不打算利用 React 的话,这是个好选择。

Material for MkDocs is a beautiful theme.

Next.js

https://nextjs.org/

Next.js is another very popular hybrid React framework. It can help you build a good documentation website, but it is not opinionated toward the documentation use-case, and it will require a lot more work to implement what Docusaurus provides out-of-the-box.

Nextra

  • Static site generator
  • Open-source software
  • Visit nextra.site

Nextra is Next.js based static site generator.

Nextra is an opinionated static site generator built on top of Next.js. It is currently less featured than Docusaurus.

Nuxt

Nuxt 是一套出色的 Vue SSR 框架, VuePress 能做的事情,Nuxt 实际上也同样能够胜任。但 Nuxt 是为构建应用程序而生的,而 VuePress 则更为轻量化并且专注在以内容为中心的静态网站上。

Pelican

Static site generator powered by Python

Pelican is a static site generator that requires no database or server-side logic.

Phenomic

Phenomic is a modular website compiler.

Retype

Retype is an open-source static site generator built with Node.js that allows users to create and manage websites with ease using Markdown as the primary content format.

Saber

Saber is a framework for building static websites.

Sphinx

Sphinx is a tool that makes it easy to create documentation.

VitePress

VitePress is a Vite & Vue Powered Static Site Generator.

VitePress 是 VuePress 的孪生兄弟,它同样由 Vue.js 团队创建和维护。 VitePress 甚至比 VuePress 要更轻更快,但它在灵活性和可配置性上作出了一些让步,比如它不支持插件系统。当然,如果你没有进阶的定制化需求, VitePress 已经足够支持你将你的内容部署到线上。

这个比喻可能不是很恰当,但是你可以把 VuePress 和 VitePress 的关系看作 Laravel 和 Lumen 。

VuePress

https://vuepress.vuejs.org/

VuePress has many similarities with Docusaurus - both focus heavily on content-centric website and provides tailored documentation features out of the box. However, VuePress is powered by Vue, while Docusaurus is powered by React. If you want a Vue-based solution, VuePress would be a decent choice.

静态网站生成器推荐:构建高性能网站的利器

主题:

  • vuepress-theme-vdoing
    • 案例1:知识库兼博客站
    • 案例2:仅博客站
    • 案例3:仅知识库
    • 案例4:文档站

teedoc

静态网站/文档网站生成工具,快速使用 markdown 或者 jupyter notebook 编写并生成 html 文档网站,建官网和文档以及知识库均适用,使用 python 编写,无需数据库,轻量稳定实用。可替代gitbook。

二、开源协议 使用MIT开源协议

https://mp.weixin.qq.com/s?__biz=Mzk0ODI4NjUyNA==&mid=2247493382&idx=1&sn=a431dc88f417745138bbb5e292997f38&chksm=c36b4255f41ccb434173ba800937ae5fe669f8ab0f6493d4e49481efe6a23477c482dd6165f7&mpshare=1&scene=23&srcid=0912SiCmGTknMjJTQDb21Noa&sharer_shareinfo=67720c22bfb1c9fbb4a5794e872ad80f&sharer_shareinfo_first=67720c22bfb1c9fbb4a5794e872ad80f#rd

vanblog

https://github.com/mereithhh/van-blog

https://blog-demo.mereith.com/

https://vanblog.mereith.com/

https://mp.weixin.qq.com/s?__biz=MzkzMDM3OTkxOQ==&mid=2247487675&idx=2&sn=b054f454adb9942a1194008b30aa87b6&chksm=c27a715bf50df84dfb3bf107851f653efc0cc97ce0b2d01bbf215f4685eda6156f1ed8a11e60&mpshare=1&scene=23&srcid=0913aj3HRwRYhzGdWxz5ASvH&sharer_shareinfo=fcd54b0f607d6cedde68e8102e721416&sharer_shareinfo_first=fcd54b0f607d6cedde68e8102e721416#rd

开源文库系统moredoc

notion + nextjs搭建博客