Code Monkey home page Code Monkey logo

pagehub's Introduction

PageHub

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:

Table of Contents generation

See this article for more information about the usage of this feature. The code lies in lib/toc.rb.

Document embedding

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.

Compatibility

I've tested PageHub only on the latest Chrome, Firefox, and Opera under Linux. I'm not sure if it works on IE.

Technical notes

Ruby objects pollution

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-effects
  • sanitize 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.

Bugs, feature requests, etc.

You can either use the GitHub issue tracking system or email me directly, I'll be happy to hear any feedback.

License

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.

pagehub's People

Contributors

amireh avatar

Stargazers

M.Zeinali avatar Hugo Quintero avatar Dominik Kopec avatar Lauren avatar zhiyue avatar Zaid Amireh avatar rahi avatar Michael Anthony avatar Ryan Taylor avatar Ben Shen avatar Kemel Zaidan avatar

Watchers

 avatar Zaid Amireh avatar Ryan Taylor avatar James Cloos avatar Dominik Kopec avatar porco rosso avatar  avatar

Forkers

tumbak dakwak cubytz

pagehub's Issues

Link to edit page when viewing

If I have permission to edit a page I'm currently viewing in the public space mode, it'd be nice to have a link to directly switch to the editor for that page.

Line comments

It would be very helpful if collaborators could comment on certain lines in an article. The tricky part here is maintaining conversations across revisions of lines. Here's a draft proposal:

  • if a commented line gets modified, the conversation maintains a reference to the original version of the line on which the comment was made, and displays a notice that it may have gotten out of date
  • if a commented line is removed, the author is asked to either move the conversation to a different line, or remove it
  • if a conversation is "removed", it gets archived in some "Page Discussions" page

Front-end access

  • guest landing
  • signing up
  • member landing (dashboard)
  • other members' profiles
  • creating a new space
  • space editor
  • space settings
  • account settings

Port the data models

  • user
  • user spaces
  • space folders
  • space memberships
  • folder pages
  • page carbon copies
  • page revisions
  • public pages
  • permissions

Configurable editor keybindings

CM supports three keybinding maps: vim, emacs, and sublime text. Currently this is hardcoded for sublime, it would be nice if the user could choose their own prefered keybinding map from the editor settings.

siging in with Github is broken

Trying to sign up with Github does not work and hit error

The 3rd-party provider did not provide us with your email, we can not create your PageHub account.

I guess this is due to the recent change on Github side : OAuth Improvements dated July 12, 2013

Is Pagehub.org dead?

I was hoping for a good looking platform to host some simple documentation, but I am having doubts regarding the status of the project.

The explore page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.