Header sections will get a descriptive hash anchor: rather than
`section-1`, the section will be given an id containing the header text
with spaces stripped and replaced with `_`. `section-Header_Goes_Here`
for instance.
Thanks to [Luke Andrew][1] for the initial work on this patch.
[1]: https://github.com/zyx
Adding a dependency on `Pathname`, which provides the excellent
`relative_path_from` method. That happens to be exactly what's needed
to fix the pathnames for the source jumplist issue that [Topfunky][]
reported.
Closes GH-26.
[Topfunky]: https://github.com/topfunky
I'm a bit loath to change the rendering entirely without talking to
Ryan, but I'd really prefer to replicate Docco's CSS file generation
rather than hotlinking out to the GitHub-hosted version. Offline
support would require it, if for no other reason...
Closes GH-23. Thanks to [Myles Byrne](http://www.myles.id.au/)
Added:
* `docs?`: True if `docs` contains text of any sort, False if
it's empty.
* `code?`: True if `code` contains text of any sort, False if
it's empty.
* `empty?`: True if both `code` and `docs` are empty. False
otherwise.
* `header?`: True if `docs` contains _only_ a HTML header. False
otherwise.
In v0.5, the Mustache template is hardcoded as
`./lib/rocco/layout.mustache`. This makes it quite difficult to
style generated content as one must edit the layout file inside the
gem itself to make changes.
I propose leaving that file as a sensible default, but allowing the user
to specify an absolute or relative (to the current working directory)
path to a mustach template of her choosing. That's implemented in this
commit.
Rocco uses the Docco CSS directly, so when they make an update to the
HTML/CSS, Rocco needs to play along. In this case, Docco changed from
`#` to `¶`, and changed classnames as well (in
[f8a88d66b381a1c04358][]).
This commit migrates that change to Rocco.
[f8a88d66b381a1c04358]:
f8a88d66b3