DocPages

DocPages is a Rails engine that provides a simple way to add documentation to your Rails application using Markdown. Create your documentation files in the app/views/docs directory with the .html.md extension and navigate to /docs to see it in action. Code snippets are syntax highlighted using Highlight.js.

Table of Contents

Installation

Add this line to your application's Gemfile:

gem "doc_pages"

And then execute:

$ bundle

Or install it yourself as:

$ gem install doc_pages

Getting Started

  • Run rails g docs install

Adding Pages

  • To add a new page, create a new file in the app/views/docs directory. The file name will be the URL path for the page. For example, app/views/docs/my-new-page.html.md will be available at /docs/my-new-page.

Customizing the views

  • To customize the views, run rails g docs copy_views.

Contributing

Issues and pull requests are welcome on GitHub at https://github.com/leopolicastro/doc_pages.

License

The gem is available as open source under the terms of the MIT License.