Skip to content

How to fork and run own getting started?

Maciej Paruszewski edited this page Aug 7, 2014 · 3 revisions

How to fork and run own getting-started?

If you want to have website like getting-started, with automatic generation with Travis and content editor like Prose, you should read that page.

1. Content editor - Prose.io

If you want to use Prose as your content editor you should read that part. You have two ways to use Prose as your content editor.

Here is what you can do:

Fork and deploy own Prose instance

If you choose to fork and deploy own Prose instance you need to do these steps:

1. Deploy gatekeeper instance on Heroku or another server.

Gatekeeper is a simple application that

Enables client-side applications to dance OAuth with GitHub.

Prose.io gatekeeper deployment steps:

  1. $ git clone git@github.com:prose/gatekeeper.git
  2. $ heroku create your-name-gatekeeper
  3. Register new application on GitHub (https://github.com/settings/applications) -> Click Settings -> Select Applications -> on Developers application section (top of the page) click Register new application -> set homepage url to gatekeeper url (https://your-name-gatekeeper.herokuapp.com) and callback url to prose.io url on GitHub (http://your-name.github.io/prose).
  4. heroku config:add OAUTH_CLIENT_ID=GITHUB_CLIENT_ID OAUTH_CLIENT_SECRET=GITHUB_CLIENT_SECRET NODE_ENV=production and change variables to those from GitHub
  5. git push heroku

2. Setup Prose editor

  1. Fork prose to your GitHub (https://github.com/prose/prose/fork).
  2. $ git clone git@github.com:your-name/prose.git
  3. git checkout gh-pages && git pull
  4. git merge master
  5. npm install (you should have nodejs installed)
  6. make clean && make
  7. find oauth.json file and update gatekeeperUrl attribute with http://your-name-gatekeeper.herokuapp.com and clientId with Client ID from GitHub used in heroku config (GITHUB_CLIENT_ID)
  8. git add dist/
  9. git commit
  10. git push

And you should have working Prose application on http://your-name.github.io/prose.

After successful deployment update in config.yml:

  1. edit_interface_link with 'http://your-name.github.io/prose/#your-name/getting-started/edit/master/((filename))'
  2. prose > siteurl with 'http://your-name.github.io/prose' and prose > relativeLinks with 'http://your-name.github.io/getting-started/links.jsonp'

You can read more about Prose editor here, about Prose configuration here and find more information about deployment here.

Use prose.io

You can also use prose.io without any deployment and configuration, just use global instance of prose - http://prose.io. If you want to have edit button that redirects you to prose editor just change edit_interface_link attribute in _config.yml to 'http://prose.io/#timvideos/getting-started/edit/master/((filename))'.

2. Travis automatic generation

  1. In your repository there should be Rakefile and .travis.yml files.
  2. gem install travis
  3. travis encrypt GIT_NAME=your-name GIT_EMAIL=your-email@email.lo GIT_TOKEN=git_token -r your-name/getting-started where git_token is a Personal Access Token generated on https://github.com/settings/applications
  4. Update .travis.yml: change env > global > secret with secret generated in step 3.

More information about Travis CI and Jekyll you can find here.

3. Summary

And after these steps you should have working getting-started website, you can start working from here or create your website with Travis and Prose based on getting-started repository and that document.

If you have any questions contact me. I will be glad to help you. 👍


Maciej Paruszewski (http://github.com/pinoss)