explaingit

petebishwhip/laradocs

15PHPAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Laravel package that turns Markdown files in your codebase into a full documentation website with sidebar navigation, dark mode, syntax highlighting, SEO tags, and a sitemap, set up in two commands.

Mindmap

mindmap
  root((laradocs))
    What it does
      Serve docs from Markdown files
      Auto-generate sidebar nav
      Built-in SEO tags
      Auto sitemap
    Features
      Dark mode
      Callout boxes
      Code blocks with copy
      Video embeds
      Shared variables
    Setup
      Composer install
      Artisan command
      Publish views to customize
    Tech Stack
      PHP
      Laravel
      Markdown
      Composer
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a documentation site to an existing Laravel app by keeping Markdown files in the repo and serving them at /docs with no separate hosting.

USE CASE 2

Create structured docs with callout boxes, syntax-highlighted code, and video embeds using standard Markdown files committed alongside your code.

USE CASE 3

Get automatic SEO metadata, Open Graph tags, and a sitemap for your project docs without any extra configuration.

USE CASE 4

Customize the look of generated docs pages by publishing and editing the default views to match your app's style.

Tech stack

PHPLaravelMarkdownComposer

Getting it running

Difficulty · easy Time to first run · 5min

Requires an existing Laravel project, setup is two commands (Composer install plus one Artisan command) with no extra infrastructure.

Use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

Laradocs is a package for Laravel, a popular PHP web framework, that lets you keep your project's documentation as Markdown files right inside the codebase. Instead of maintaining docs on a separate platform or wiki, you write Markdown files, commit them alongside the code they describe, and the package automatically serves a documentation website at a URL like /docs within your app. The setup takes two commands: install the package with Composer and run an Artisan command. From there you create new pages with another Artisan command, which scaffolds a Markdown file with a header block for metadata including title, description, and sort order. The folder structure you use for your Markdown files becomes the sidebar navigation in the generated site. The generated site includes a responsive layout with a sidebar, breadcrumbs, a table of contents for each page, and previous/next links. Dark mode is included. You can customize or replace the views and assets by publishing them, so the appearance can be adjusted to match your project's style. Beyond basic Markdown, the package supports callout boxes (for tips, notes, and warnings), syntax-highlighted code blocks with copy buttons, image captions, and video embeds from local files or YouTube or Vimeo. You can define shared variables and reusable content blocks that get injected into your docs at render time. Pages are cached for performance and the cache clears automatically when a file changes. SEO features are built in: every page gets a proper title tag, meta description, Open Graph and Twitter card tags, a canonical URL, and structured data markup. An auto-generated sitemap is available at a predictable path. All of this works out of the box. The package is MIT-licensed and the project's own documentation site is itself built with Laradocs.

Copy-paste prompts

Prompt 1
Install Laradocs in my Laravel project, create a first documentation page, and set up the sidebar with two sections using the folder structure.
Prompt 2
I want to add callout boxes and syntax-highlighted code blocks with copy buttons to my Laradocs pages. Show me the Markdown syntax for both.
Prompt 3
How do I define shared variables in Laradocs so I can inject a product name into every docs page without repeating it?
Prompt 4
My Laradocs site needs to match my app's branding. Walk me through publishing the views and assets and overriding the default layout.
Prompt 5
Show me how Laradocs handles page caching and how to manually clear the cache after a bulk update to my Markdown files.
Open on GitHub → Explain another repo

← petebishwhip on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.