# sloth-docs **Repository Path**: mirrors_claviska/sloth-docs ## Basic Information - **Project Name**: sloth-docs - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-03-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Sloth Docs ๐ฆฅ ๐ A documentation generator powered by Node.js and sloths. - Converts markdown and generates static HTML files ๐ฑ - Supports custom themes and templates ๐จ - Runs via CLI so you don't clutter up your app directory ๐งน - Integrated dev server so you can see changes as you edit โจ - Built-in full-text search ๐ - Pluggable ๐ ## TODO This project is a work in progress. There are still some things left to do: - [ ] Make the default theme prettier - [ ] Highlight the current page in the sidebar - [ ] Add a CLI command to initialize a new docs project - [ ] Generate `sloth-docs.config.js` if it doesn't exist - [ ] Copy `README.md` to `docs/home.md` if it does exist - [ ] Add more plugin hooks - [ ] Hook to modify markdown before it's parsed - [ ] Hook to modify HTML before it's written to file - [ ] Add a `baseUrl` config so the docs can be more easily hosted in a subdirectory - [ ] Find original sloth SVG again and add attribution ## Installation It's recommended to install the CLI globally. ```shell npm install -g sloth-docs ``` ## Configuration You can run the CLI without a config, but if you want to change the default config, create `sloth-docs.config.js` in the root of your project with one or more of the following options: ```js module.exports = { // The name of your docs site name: 'Sloth Docs', // The docs site favicon URL favicon: '/assets/favicon.png', // The docs site logo URL logo: '/assets/sloth.svg', // The directory that contains your markdown files docs: 'docs', // The directory where docs will be published to (WARNING! This directory is deleted and recreated on every build) dist: 'dist', // The name of the sidebar file sidebar: '_sidebar.md', // The directory that contains the theme you want to use (defaults to the built-in theme) theme: 'your-theme-folder', // Optional plugins plugins: [] }; ``` ## Usage Run the CLI from the same directory as `sloth-docs.config.js`. The following commands are available. ```shell # Launch the dev server and watch files sloth-docs --serve # Build the docs sloth-docs --build # Clean the dist directory sloth-docs --clean # List all options sloth-docs --help ``` ## Creating Pages Add pages by creating markdown files in your `docs` directory. Here's a sample file with all supported [front matter](https://github.com/jxson/front-matter) properties. ``` --- title: Sloths Can Swim description: Sloths are actually pretty fast swimmers! template: default --- # Sloths Can Swim Lorem ipsum dolor amet... ``` Keep in mind that `