how to point gist to bl.ocks.org

256 views
Skip to first unread message

Johnathan Mercer

unread,
May 6, 2013, 9:31:11 AM5/6/13
to d3...@googlegroups.com
Hi,
I'm a n00b to github and gist. After I create the gist, how do I actually point it to bl.ocks.org? I see download, clone, embed etc but there is nothing in the options while I am editing to point it.
John

aRob

unread,
May 6, 2013, 9:45:56 AM5/6/13
to d3...@googlegroups.com
I had the same question.  Here's the thread: https://groups.google.com/forum/?fromgroups=#!searchin/d3-js/How$20to$20create$20a$20bl.ocks$20url$3F$3F|sort:relevance/d3-js/XyF2-cN9c2I/oTykOuxbtvMJ

Essentially you just need to replace https://gist.github.com with http://bl.ocks.org/ in the url to your gist code.

Hope this helps.

-Aliya

Johnathan Mercer

unread,
May 6, 2013, 10:09:55 AM5/6/13
to d3...@googlegroups.com
Nice!!


--
You received this message because you are subscribed to a topic in the Google Groups "d3-js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/d3-js/tidQ4pWM9ZQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

joe beuckman

unread,
May 21, 2013, 5:01:04 PM5/21/13
to d3...@googlegroups.com
I have gists that are not html that I would like to keep. Is there a way to hide them from bl.ocks.org?

Chris Viau

unread,
May 21, 2013, 5:45:14 PM5/21/13
to d3...@googlegroups.com
If you rename index.html to something else, I think it will be ignore.


--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.

joe beuckman

unread,
May 21, 2013, 5:52:59 PM5/21/13
to d3...@googlegroups.com
That shows a block linking to whatever code is in the gist. I'm looking for a way to hide public gists that aren't intended for bl.ocks.org

Ian Johnson

unread,
May 21, 2013, 5:55:13 PM5/21/13
to d3...@googlegroups.com
set the gist to private?
bl.ocks doesn't discriminate, if you direct link to a gist it will show.
it wont show up in your user listing if it doesn't have an index.html (the user listing just does a simple query on all your public gists with index.html).

it's not about hiding, just don't link to gists you don't want to be blocks.
Ian Johnson - 周彦

joe beuckman

unread,
May 21, 2013, 5:58:15 PM5/21/13
to d3...@googlegroups.com
I have gists with no index.html that show in my user listing on bl.ocks.org

Chris Viau

unread,
May 21, 2013, 5:58:31 PM5/21/13
to d3...@googlegroups.com
You are right. Here is a bl.ocks without an index.html that appears in my bl.ocks list: http://bl.ocks.org/biovisualize/5320723

Ian Johnson

unread,
May 21, 2013, 6:01:04 PM5/21/13
to d3...@googlegroups.com
my mistake, i was under the impression that was how it used to work.
you can always fork bl.ocks ;)

joe beuckman

unread,
May 21, 2013, 6:12:36 PM5/21/13
to d3...@googlegroups.com
Maybe Mike is listening? I think if there is no index.html or no thumbnail.png, that might be a good reason not to show a gist in bl.ocks.org

Chris Viau

unread,
May 21, 2013, 6:29:45 PM5/21/13
to d3...@googlegroups.com
Looking at the last available source code, nothing seems to prevent them to be listed. I suppose you can open an issue if you think the behavior should be changed:
Chris

Mike Bostock

unread,
May 21, 2013, 6:52:54 PM5/21/13
to d3...@googlegroups.com
All gists are shown, not just those with an index.html. If you don’t want a gist to appear, then you must create a "secret" gist instead.

This change was partly a side-effect of GitHub removing the "files" hash from the user gist list API; there’s no longer an efficient way for an external entity to tell which gists have an index.html and which don’t.

However, I also think it’s handy to use bl.ocks.org to share files without an index.html, say as a prettier way to present prose:


Mike

joe beuckman

unread,
May 21, 2013, 7:51:23 PM5/21/13
to d3-js
That's a handy feature. What if there were an optional bl.ocks.json file that could provide display parameters, including the ability to hide the gist or particular gist files from bl.ocks.org? I'm happy to submit an issue if this is something that could be useful.


--

Chris Viau

unread,
May 21, 2013, 8:24:14 PM5/21/13
to d3...@googlegroups.com
It could be an improvement, even if I think bl.ocks is trying to avoid querying more files, as there is a cost to this (requests, cache management, etc.). 


--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.

Mike Bostock

unread,
May 21, 2013, 8:48:51 PM5/21/13
to d3...@googlegroups.com
There’s no way to see what files are available in a gist, when listing a user’s gists. So using a file to hide a gist wouldn’t be possible without fetching the gist (which is expensive, even though they are cached in-memory). You could use a file to customize the display of an individual gist, but so far I’ve hesitated to make bl.ocks.org more configurable than necessary. You can hide individual files in the source view by using the prefix "README"; also, large files are automatically not shown to prevent the page from hanging during syntax highlighting.

Mike

Reply all
Reply to author
Forward
0 new messages