Table of contents

HotDocs: Helpers

HotDocs comes with helpers.

active_link_to

Produces a <a class="active"> if the link points to the current page.

Code

<%= active_link_to "Self", root_path %>

Result

Self

external_link_to

Produces a <a> with the external link icon.

Code

<%= external_link_to "Example", "example.com" %>

Result

Example

edit_link

Set the repository_base_url in layouts/hot_docs.html.erb to show the "Edit this page" link at the bottom of each page.

Edit this page