Skip to content

Embed Snippets

Description

It would be nice to embed public snippets on other websites in a GitHub Gists way

Proposal

GitLab already provides the prossibility to add public, internal or private snippets on projects.
To enhance this feature it would be useful to embed public snippets on other websites.

Overview

Everyone can add a public snippet.
It should be possible to generate a public facing link and/or embed code for every public snippet.

Use cases

  • Technical Documentation with code examples

Feature checklist

  • Embeddable, immutable code editor with all available syntax highlightings from gitlab

Community contributions

  • This issue is accepting community contributions. If you would like to work on this issue, please leave a comment here indicating so, and we'll have our UX team finalize the designs.

Designs

Within GitLab

Group

image

This would introduce a way to get a share-able permalink as well (see mocks)

Also, the mockup is a quick one, try to see if you can use the default button styles/sizes similar to

image

Embedded:

  • gitlab logo (which links to the gitlab instance from which it comes):
option 1:

image

option 2:

or (when hover over logo it would become full opacity when on hover)

image

Edited by 🤖 GitLab Bot 🤖