### Start Local Development Server Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/quickstart.mdx This command initiates the local development server for previewing documentation changes. It requires the Mintlify CLI to be installed globally. Run this command from the root directory of your documentation project, where the 'mint.json' file is located. ```bash mintlify dev ``` -------------------------------- ### Install htmldocs Packages (npm, pnpm, yarn, bun) Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/getting-started.mdx Installs the necessary htmldocs packages for React and rendering into the project using the specified package manager. These packages are required for manual setup. ```bash npm install htmldocs @htmldocs/react @htmldocs/render ``` ```bash pnpm add htmldocs @htmldocs/react @htmldocs/render ``` ```bash yarn add htmldocs @htmldocs/react @htmldocs/render ``` ```bash bun add htmldocs @htmldocs/react @htmldocs/render ``` -------------------------------- ### Start htmldocs Development Server (npm, pnpm, yarn, bun) Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/getting-started.mdx Starts the htmldocs development server, which provides a live preview of the documents in the browser. This command is typically run after initialization or manual setup. ```bash npm run dev ``` ```bash pnpm dev ``` ```bash yarn dev ``` ```bash bun dev ``` -------------------------------- ### Install Mintlify CLI for Local Preview Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/quickstart.mdx This command installs the Mintlify Command Line Interface globally, enabling local previewing of documentation changes. Ensure Node.js and npm are installed. After installation, navigate to your documentation's root directory and run 'mintlify dev'. ```bash npm i -g mintlify ``` -------------------------------- ### Initialize htmldocs Project Source: https://context7.com/htmldocs-js/htmldocs/llms.txt Scaffolds a new htmldocs project, copies starter templates, sets up package.json, installs dependencies including Playwright, and creates a default documents directory. Navigate to the project directory and run 'npm run dev' to start the development server. ```bash npx htmldocs@latest init my-project cd my-project npm run dev ``` -------------------------------- ### Add htmldocs Dev Script to package.json Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/getting-started.mdx Adds a 'dev' script to the package.json file to easily start the htmldocs development server. This script uses npx to execute the htmldocs dev command. ```json { "scripts": { "dev": "npx htmldocs@latest dev" } } ``` -------------------------------- ### Start htmldocs Local Development Server CLI Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/cli.mdx Starts a local development server that watches files and automatically rebuilds document templates on changes. Login is not required. Supports various package managers. ```npm npx htmldocs@latest dev ``` ```pnpm pnpx htmldocs@latest dev ``` ```yarn yarn dlx htmldocs@latest dev ``` ```bun bunx htmldocs@latest dev ``` -------------------------------- ### htmldocs Document Template (React/TypeScript) Source: https://github.com/htmldocs-js/htmldocs/blob/canary/apps/docs/getting-started.mdx A sample React component demonstrating how to create a document template for htmldocs. It includes importing necessary components, rendering Markdown content, and setting up a footer with page numbers. ```tsx import { Document, Footer } from "@htmldocs/react" import MarkdownIt from 'markdown-it' import "~/index.css" const MARKDOWN_CONTENT = "\n# The Art of Programming\n\n## Chapter 1: Fundamentals\n\nProgramming is both a science and an art. It requires logical thinking and creative problem-solving. In this book, we will explore the principles that make software development a fascinating discipline.\n\n### 1.1 The Programming Mindset\n\nTo become an effective programmer, one must develop a particular way of thinking. This includes:\n\n- Breaking down complex problems into manageable parts\n- Thinking algorithmically about solutions\n- Understanding data structures and their applications\n- Embracing continuous learning and adaptation\n\nThe journey of a programmer is one of constant growth and discovery.\n" const md = new MarkdownIt({ html: true }) function Book() { const html = md.render(MARKDOWN_CONTENT) return (