tightenco/jigsaw-docs-template 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tightenco/jigsaw-docs-template

Composer 安装命令:

composer require tightenco/jigsaw-docs-template

包简介

Documentation starter template for Jigsaw static site generator by Tighten

README 文档

README

This is a starter template for creating a beautiful, customizable documentation site for your project with minimal effort. You’ll only have to change a few settings and you’re ready to go.

View a preview of the docs template.

Installation

After installing Jigsaw, run the following command from your project directory:

./vendor/bin/jigsaw init docs

This starter template includes samples of common page types, and comes pre-configured with:

  • A fully responsive navigation bar
  • A sidebar navigation menu
  • Tailwind CSS, a utility CSS framework that allows you to customize your design without touching a line of CSS
  • Syntax highlighting using Prism.js
  • A script that automatically generates a sitemap.xml file
  • A search bar powered by Algolia DocSearch, and instructions on how to get started with their free indexing service
  • A custom 404 page

Docs starter template screenshot

Configuring your new site

As with all Jigsaw sites, configuration settings can be found in config.php; you can update the variables in that file with settings specific to your project. You can also add new configuration variables there to use across your site; take a look at the Jigsaw documentation to learn more.

// config.php
return [
    'baseUrl' => 'https://my-awesome-jigsaw-site.com/',
    'production' => false,
    'siteName' => 'My Site',
    'siteDescription' => 'Give your documentation a boost with Jigsaw.',
    'docsearchAppId' => '',
    'docsearchApiKey' => '',
    'docsearchIndexName' => '',
    'navigation' => require_once('navigation.php'),
];

Tip: This configuration file is also where you’ll define any "collections" (for example, a collection of the contributors to your site, or a collection of blog posts). Check out the official Jigsaw documentation to learn more.

Adding Content

You can write your content using a variety of file types. By default, this starter template expects your content to be located in the source/docs folder. If you change this, be sure to update the URL references in navigation.php.

The first section of each content page contains a YAML header that specifies how it should be rendered. The title attribute is used to dynamically generate HTML title and OpenGraph tags for each page. The extends attribute defines which parent Blade layout this content file will render with (e.g. _layouts.documentation will render with source/_layouts/documentation.blade.php), and the section attribute defines the Blade "section" that expects this content to be placed into it.

---
title: Navigation
description: Building a navigation menu for your site
extends: _layouts.documentation
section: content
---

Read more about Jigsaw layouts.

Adding Assets

Any assets that need to be compiled, such as JavaScript or CSS using Tailwind, can be added to the source/_assets/ directory. Vite will process them when running npm run dev or npm run build, and the processed assets will be stored in /build_local or /build_production, respectively.

Files that don't need processing (like images and fonts) can be placed in /source/assets/ and will be included in the build as-is.

Read more about compiling assets in Jigsaw using Vite.

Building Your Site

Now that you’ve edited your configuration variables and know how to customize your styles and content, let’s build the site.

# run development server
npm run dev

# build static files with Vite
npm run build

tightenco/jigsaw-docs-template 适用场景与选型建议

tightenco/jigsaw-docs-template 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 27.49k 次下载、GitHub Stars 达 50, 最近一次更新时间为 2018 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「generator」 「documentation」 「template」 「static」 「site」 「docs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tightenco/jigsaw-docs-template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tightenco/jigsaw-docs-template 我们能提供哪些服务?
定制开发 / 二次开发

基于 tightenco/jigsaw-docs-template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 27.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 50
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 50
  • Watchers: 11
  • Forks: 19
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-18