zfcampus/apigility.org — pull request #7 by weierophinney (2014-03-30 21:43:40+00:00)
Title: Documentation integration

This pull request updates the website to integrate zfcampus/apigility-documentation. It adds that repository as a composer dependency, and builds a module around fetching data from the repository as well as rendering it.

Rendering performs the following operations:

- Fenced code blocks are passed off to `pygmentizer`, to perform syntax highlighting. Since we already have approprate CSS for use with Pygments, this provides us with excellent syntax highlighting out-of-the-box.
- Code is then passed to Parsedown to render the GitHub-flavored Markdown to HTML.
- The resultant HTML is passed to a routine that rewrites all relative links to work with the site (asset links are rewritten to remove the "/asset" segment; document links are rewritten to remove the ".md" suffix and add the appropriate section prefix (e.g., "/documentation").
- The TOC is rendered for each page, with the current page being matched and highlighted in the sidebar.

TODO:

- [ ] GFM Tables are not being rendered correctly by Parsedown
- [ ] Sidebar should likely collapse inactive sections
- [ ] Mobile-version of the sidebar