An online service for composing documents using Markdown syntax.
The application is built using Ruby, it runs on a MySQL backend, and has the following gem dependencies:
gem 'sinatra'
gem 'sinatra-content-for'
gem 'sinatra-flash'
gem "data_mapper", ">=1.2.0"
gem 'redcarpet'
gem 'albino'
gem 'nokogiri'
CodeMirror is used for the Markdown JavaScript editor.
PageHub extends the RedCarpet Markdown renderer to add support for the following:
See this article for more information about the usage of this feature. The code lies in lib/toc.rb
.
I'm tired of having to maintain multiple versions of documents that contain the very same information, so I added an embedding facility that allows you to get content out of a page and insert it into a page on PageHub.
The embedding module allows for the definition of content processors that handle the data extraction from certain sources; for example, I have many documents on GitHub Wikis and I wanted to use some of them, so I was able to define a processor that extracts (using nokogiri
) the content of wiki articles and embed them in my PageHub ones.
I've tested PageHub only on the latest Chrome, Firefox, and Opera under Linux. I'm not sure if it works on IE.
Hash
delete!(key)
that removes a key from the Hash and returns itself instead of the removed value
See lib/common.rb
for more info.
String
to_markdown
will render its content as markdown with no side-effectssanitize
normalizes a string to be safely used in URIs (Unicode aware)
See lib/common.rb
for more info.
DataMapper::Resource
See models/datamapper_resource.rb
for more info.
You can either use the GitHub issue tracking system or email me directly, I'll be happy to hear any feedback.
The thing is open and free. Host it yourself if you want to, and the license is public domain; do whatever you want with it.