note: this is a work in progress
auth.coffee used for login (source repo of the original auth.coffee vendored in this repo: https://github.com/the-grid/apidocs/blob/master/code-examples/coffeescript/auth.coffee ) ---> command: grid (needs alias to be installed, otherwise ruby grid_mkv.rb)
TheGrid now makes damn cool websites just by passing anything into it (video, picture, text, link, social stream, filtered social stream like by tag etc...)
You can create a website from just content (links + metadata) with a shell command + some clicks in thegrid app
The target of this project
grid http://example.com grid http://antani.com
you publish from the app (few clicks, just select the site you want to publish to)
it creates a cordova app with the content from the site + an android apk
this repo, other than the information of creating websites , gives you a command as an alias (evn if it should package a binary in the future for simplicity / ease of use (no need to setup language or dependencies)
Why create a docker container at all when you can create a binary? (compilation happens on architecture - libraries not linking problem)
my thegrid.io autogenerated websites
The sites get generated automatically with content and layout infos stored in the site SAF files (
They get published via thegrid API.
Use the coffeescript
auth.coffe programs/script to authenticate to get an auth token
THEGRID_APP_ID=your_uuid THEGRID_APP_SECRET=xxxxx coffee publish/auth.coffee
with my app uuid:
THEGRID_APP_ID=e51b880c-8b87-46e8-83af-feb6dffc6f0b THEGRID_APP_SECRET=$THEGRID_KEY coffee publish/auth.coffee
in my case, because I exported that in an environment variable I have ($THEGRID_KEY), so I can regenerate easily tokens to keep posting on the grid :D
FIY that's the export command I put in my ~/.bashrc
(the infos reported here can be found in the original coffeescript module)
visit http://localhost:3000, click the blue link, log in and obtain the token (you can hit CTRL-C to shutdown the server and run the export command to export the token)
gem i hashie
TOKEN=$THEGRID_TOKEN ruby grid_mkv.rb
Of course you can setup your DNS records manually, but I like to do it via API, so I have a
dns.rb script to do that.
Install the prereqs.
gem i dnsimple
Run the script
You need to add
config/dnsimple_token.txt (general API token, not domain token) and then configure your domain directly into
Each site took ~5 minutes to create
I did some editing afterwards, but it was minimal.
When I wrote this readme and the
grid script originally, thegrid.ai was not as good as it is now.
TODO: package the
grid script as a binary
- awesome, publish the first version of the site via api and see it automatically layout-ed :D
- needs global cdn, the current one sometimes is slow in europe