script-lab-2017 icon indicating copy to clipboard operation
script-lab-2017 copied to clipboard

Better GIST presentation on GitHub

Open Zlatkovsky opened this issue 8 years ago • 1 comments

When we share a Gist, we should create a second file with the same filename as the GIST, but with a whitespace in front and with a .md extension instead.

See live example of what that would look like: https://gist.github.com/Zlatkovsky/67baf0d1031fbdba71474c898c016f83

image

That file should contains the following markdown (or similar)

## Snippet: "Resuming `Excel.run` repro"
#### Authored and shared using [Script Lab](https://aka.ms/scriptlab), a free add-in for experimenting with the Office JavaScript APIs.

* [View the snippet online](https://script-lab.azureedge.net/view/excel/gist/67baf0d1031fbdba71474c898c016f83)
* [Open in Excel](https://script-lab.azureedge.net/open/excel/gist/67baf0d1031fbdba71474c898c016f83) (recommended), or [download an Excel file](https://script-lab.azureedge.net/download/excel/gist/67baf0d1031fbdba71474c898c016f83) containing the snippet.

#### Shared by Zlatkovsky

The parts that are substituted are the title in the first line, the username in the last line, and the IDs.

Notes

Note that on first publish, won't know gist ID, so will need to make the about-file-addition be a secondary step.

Also note that when publishing an update to a snippet, if snippet got renamed, then the markdown should be renamed as well (and re-generated to reflect the new name).

Zlatkovsky avatar Aug 11 '17 01:08 Zlatkovsky

@cshashwat and @dsaunders45459 , I do think that this is a cool feature to do, but I'm also OK with postponing it (someone else can pick it up in their spare time) if we want Shashwat to focus on the next project and be able to drive it through to completion.

So, filing this more for the record than for Shashwat to immediately implement it (unless he's really excited to do it). My guess is that it's 2-3 hours' worth of work, plus a bit of testing. So not huge, but also not trivial.

Zlatkovsky avatar Aug 11 '17 01:08 Zlatkovsky