@avgeek-oss/mintlify-docs

中文文档
0.2.0发布于 2026/10/29Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 2535

Shared Mintlify homepage layouts, documentation primitives and site tooling for Avgeek OSS projects

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录4 节
  1. Install and use
  2. Guides
  3. Development
  4. Publishing

Avgeek OSS Mintlify Docs

Shared Mintlify homepage layouts, documentation primitives, and site tooling for Avgeek OSS projects. Product repositories own their content, branding, navigation destinations, screenshots, API schemas, analytics, and legal pages.

Mintlify custom components cannot import external npm packages. This kit installs as a development tool and generates local JSX snippets, CSS, JavaScript, and docs.json for Mintlify to serve directly. Commit those generated files. CI checks them against the exact installed kit so edits cannot silently drift.

Install and use

Use Node.js 26 and pnpm 11. The package is public on npmjs.org and requires no registry credentials.

pnpm add -Dw @avgeek-oss/[email protected]

When migrating from @avgeek-oss/docs, remove that dependency, add @avgeek-oss/mintlify-docs, and update scripts to use the mintlify-docs CLI. Change any @avgeek-oss registry mapping to https://registry.npmjs.org and refresh the lockfile. Generated filenames and snippet import paths stay the same. Run docs:sync to update their package metadata.

Create a product-owned docs/site.json. It needs name, colors (primary, light and dark), navigation, a navbar.primary CTA and footer.links; Navigation and site configuration describes each. All additional native Mintlify options are preserved.

{
  "scripts": {
    "docs:sync": "mintlify-docs sync --config docs/site.json --dir docs",
    "docs:check": "mintlify-docs check --config docs/site.json --dir docs --content",
    "docs:validate": "mintlify-docs validate --dir docs"
  }
}

Run pnpm docs:sync, commit its output, and run pnpm docs:check and pnpm docs:validate in CI. Repeat after upgrading the pinned kit. Sync only writes its declared generated files and the assets copies listed in site.json; it leaves product pages and local styles untouched. --content also checks navigation pages, MDX, frontmatter, routes, redirects, internal links, anchors and screenshot sizes. validate runs Mintlify's validation, broken-link and accessibility checks with the CLI version the kit pins. See Site tooling for assets, navigation includes, {version} and the content checks.

Scripts can import syncSite, checkSite, checkContent, loadSite and validateSite from @avgeek-oss/mintlify-docs; nothing needs a path inside the package.

Import snippets directly into the parent MDX page:

import { Home, Hero, Actions, ActionLink } from "/snippets/oss/homepage.jsx";

<Home>
  <Hero id="hero-heading">
    <h1 id="hero-heading">Your project</h1>
    <p>Explain what it helps people do.</p>
    <Actions>
      <ActionLink href="/docs/getting-started">Get started →</ActionLink>
    </Actions>
  </Hero>
</Home>

Set mode: "custom" in homepage frontmatter. Import all snippet dependencies in the page; Mintlify does not support cross-snippet imports.

Guides

  • Homepage and screenshots: exported components, slots, heading structure, responsive images, and themes.
  • Navigation and site configuration: categories, grouped page lists, header/footer links, and generated-file ownership.
  • Site tooling: sync, drift and content checks, pinned Mintlify validation, assets, navigation includes, {version}, and the package API.
  • Writing documentation: task guides, reference pages, native Mintlify components, examples, screenshots, and verification.

Development

These are development notes for the maintainers. We are not accepting contributions from public sources, to curb automated pull requests and because there are no dedicated resources to review and sign them off. Feedback and issues are welcome in this repository; we triage them and strive to fix them at the earliest. Report security vulnerabilities privately as described in SECURITY.md.

Use Node.js 26 and pnpm 11. Development rules are in AGENTS.md.

pnpm install --frozen-lockfile
pnpm verify
pnpm validate:fixture
pnpm dev

pnpm verify checks formatting, runs oxlint and Stylelint and the tests, and installs the packed tarball into a fresh temporary project outside this checkout, where it runs generation and drift checking. Tests sync the fixture site in test/fixtures/site.mjs into temporary directories; nothing generated is committed. When a change adds a feature or export, exercise it in the fixture.

pnpm validate:fixture runs Mintlify's pinned validation, broken-link and accessibility checks on the fixture's generated output; it needs network access, and CI runs it too. To move to a newer Mintlify CLI, change mintVersion in src/validate.mjs and the dev script together. pnpm dev writes the fixture into .preview/ (not committed), syncs it and serves it at http://localhost:4176. Review the homepage and guide in light and dark themes at desktop and mobile widths, and check that search, category navigation, nested groups, theme controls, keyboard focus, CTA destinations and footer links still work.

Release notes are in CHANGELOG.md. Source and third-party attribution are in NOTICE and LICENSE.

Publishing

Pull requests and pushes to main run the verify check. Update the version and add its ## X.Y.Z (YYYY-MM-DD) section to the changelog through the normal review process. Once that has merged and main is green, run the Cut release workflow from main (Actions, Cut release, Run workflow). It checks the version, changelog, tag and npm state, and that the verified main run of the commit still has its package artifact, then creates the annotated v<version> tag and starts the publish run on it. Pushing the same tag by hand does the same.

The publish run does not verify or rebuild again. It downloads the tarball that the main run of the tagged commit verified, checks its integrity, publishes those exact bytes without running package lifecycle scripts, checks that the registry serves the same integrity, and installs it in a fresh consumer. A retry accepts an existing version only if its integrity matches the verified candidate. After a successful publish, a separate job creates or updates the tag's GitHub release from that version's CHANGELOG.md section.

The publish job uses npm trusted publishing with GitHub Actions OIDC. Configure avgeek-oss/oss-docs and workflow ci.yml in the package's npm trusted-publisher settings. The job has id-token: write; no publishing token is stored in GitHub secrets. Existing GitHub Packages versions remain available for old checkouts.

Licensed under Apache-2.0. The initial layout is extracted from Towbar.

版本与发布记录

@avgeek-oss/mintlify-docs 共发布 3 个版本,首次发布于 2026/10/13;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.0latest2026/10/299 天前
0.1.62026/10/1325 天前
0.0.0-stage2026/10/1325 天前

关于 @avgeek-oss/mintlify-docs 的常见问题

@avgeek-oss/mintlify-docs 是什么?

Shared Mintlify homepage layouts, documentation primitives and site tooling for Avgeek OSS projects注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @avgeek-oss/mintlify-docs?

在项目目录运行 npm install @avgeek-oss/mintlify-docs,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mintlify-docs,可以用 npx mintlify-docs 直接运行。

@avgeek-oss/mintlify-docs 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@avgeek-oss/mintlify-docs 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@avgeek-oss/mintlify-docs 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=26。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@avgeek-oss/mintlify-docs 可以商用吗?

@avgeek-oss/mintlify-docs 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@avgeek-oss/mintlify-docs 的下载量有多少?

根据 npm 官方下载统计,@avgeek-oss/mintlify-docs 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,535 次,日均约 85 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@avgeek-oss/mintlify-docs 还在维护吗?

最新版本 0.2.0 发布于 2026/10/29(9 天前);至今共发布 3 个版本,其中过去 12 个月发布了 3 个;首次发布于 2026/10/13。作者已将其标记为弃用,新项目建议寻找替代方案。