Sha256: df83895adb46f7c670fe355d4da44ff680b5168a12e7736611fa98e8d85003b3

Contents?: true

Size: 1.16 KB

Versions: 8

Compression:

Stored size: 1.16 KB

Contents

---
title: Documentation Plugins
permalink: /docs/
---

# Octopress Docs

If you have the Octopress gem installed, run `$ octopress docs` from the root of your Jekyll site, and a website will mount at `http://localhost:4444` with documentation for Octopress and any plugins which support this feature.

## Adding docs to your plugin

If your plugin is built on Octopress Ink, these documentation pages are added automatically. If not, use
the code below to automatically add your plugin's Readme, Changelog and any pages in your gem path under `assets/docs`.

```ruby
if defined? Octopress::Docs
  Octopress::Docs.add({
    name:        "Your Plugin",
    gem_name:    "your-gem",
    description: "This plugin causes awesomeness",
    path:        File.expand_path(File.join(File.dirname(__FILE__), "../")), # gem root
    slug:        "your-plugin",                      # optional
    source_url:  "https://github.com/some/project",  # optional
    website:     "http://example.com",               # optional
  })
end
```

It's a bit odd, but the `if defined? Octopress::Docs` allows you to register doc pages if possible, without having to add the octopress gem as a dependency.

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
octopress-3.0.12.pre.1 assets/docs/docs.md
octopress-3.0.11 assets/docs/docs.md
octopress-3.0.10 assets/docs/docs.md
octopress-3.0.9 assets/docs/docs.md
octopress-3.0.8 assets/docs/docs.md
octopress-3.0.7 assets/docs/docs.md
octopress-3.0.6 assets/docs/docs.md
octopress-3.0.5 assets/docs/docs.md