nyc-bookstores/readme.md

36 lines
1.9 KiB
Markdown
Raw Normal View History

2013-05-27 20:50:06 +00:00
# Hi!
2013-05-27 20:45:59 +00:00
2013-05-28 03:53:16 +00:00
![screenshot](https://raw.github.com/jlord/hack-spots/gh-pages/img/hackspotsss.png)
2013-09-12 01:24:42 +00:00
This is the code for a website that shows the spots myself, my friends (or Twitter friends) have found to be excellent hacking spots around the whole wide world.
2013-05-27 20:45:59 +00:00
2013-07-30 17:48:52 +00:00
### Fork -n- Go!
2014-11-25 05:33:46 +00:00
Here's a fun fact:
2013-07-30 17:48:52 +00:00
2014-11-25 05:32:50 +00:00
GitHub gives free hosting for every repository (see [GitHub Pages](http://pages.github.com)).
2014-11-25 05:33:46 +00:00
This repo only has a **gh-pages** branch, the branch GitHub hosts, which means as soon as you **fork** it, you have a hosted and live version of it yourself! Read more about [fork-n-go](http://jlord.github.io/forkngo) type of projects.
2013-07-30 17:48:52 +00:00
2014-09-15 05:57:21 +00:00
Next, create a spreadsheet with the same column headers as [the original](https://docs.google.com/a/github.com/spreadsheets/d/1hnfQcggYcBYimuO_UOMvwoOi_I9vUvFpkMt4wjrrpLE/edit#gid=0).
2013-07-30 17:48:52 +00:00
Click on the `index.html` file, click edit and change **line 118** (or thereabouts) it looks like:
```javascript
document.addEventListener('DOMContentLoaded', function() {
var gData
var URL = "0Ao5u1U6KYND7dFVkcnJRNUtHWUNKamxoRGg4ZzNiT3c"
Tabletop.init( { key: URL, callback: showInfo, simpleSheet: true } )
})
```
Replace the existing spreadsheet URL key with your spreadsheet's key. You'll find that by clicking (in Google Spreadsheets) File > Publish to the Web > Start Publishing, it will then display the key in a window. ![get key](https://raw.github.com/jllord/sheetsee-cache/master/img/key.png)
2013-07-30 17:48:52 +00:00
Commit those changes and **LIKE WOAH** you now have a version of this website hooked to a spreadsheet that you can distrubute however you'd like.
You can find your version at **yourGitHubName.github.io/theReposName** (in this case /hack-spots).
2013-05-27 20:50:06 +00:00
## But How?
2013-05-27 20:45:59 +00:00
2013-05-27 20:50:06 +00:00
A Google Spreadsheet holds all the data and it is connected to this website using the goodies in [sheetsee.js](http://www.github.com/jlord/sheetsee.js). Everytime you visit the website, you'll have the most up to date data that has been entered into the spreadsheet.