Feature request: Embeddable .js option #3910

Closed
opened 2025-11-02 05:30:20 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @STaRDoGG on GitHub (Sep 5, 2019).

I'd love to have the option to get an embeddable link to a file when viewing any specific file in a repo.

Example:
On GH you can create Gists, and once you do, it offers an option to copy an embeddable .js file that you can put on any other site. If you're not already familiar with it, it looks like this:

image

Which gives you a script like:

<script src="https://gist.github.com/STaRDoGG/70bc7807cfdb2a88a04dcad8474dbd07.js"></script>

And then once run on a site, shows you the code, all pretty and formatted, etc.

It'd be awesome to be able to do the same thing with any file in a repo in Gitea as well, so we can embed code from our own repos into other sites.

Perhaps just clone and modify the Gist .js file and modify it to work with Gitea?

Originally created by @STaRDoGG on GitHub (Sep 5, 2019). I'd love to have the option to get an embeddable link to a file when viewing any specific file in a repo. **Example:** On GH you can create Gists, and once you do, it offers an option to copy an embeddable .js file that you can put on any other site. If you're not already familiar with it, it looks like this: ![image](https://user-images.githubusercontent.com/1524526/64386567-1bb57e00-cfff-11e9-8921-691b54da115c.png) **Which gives you a script like:** `<script src="https://gist.github.com/STaRDoGG/70bc7807cfdb2a88a04dcad8474dbd07.js"></script>` And then once run on a site, shows you the code, all pretty and formatted, etc. It'd be awesome to be able to do the same thing with any file in a repo in Gitea as well, so we can embed code from our own repos into other sites. Perhaps just clone and modify the Gist .js file and modify it to work with Gitea?
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:30:20 -06:00
Author
Owner

@stale[bot] commented on GitHub (Nov 4, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Nov 4, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Nov 5, 2019):

I think you can already do that, i.e. https://gitea.com/grafana/grafana/raw/branch/master/public/vendor/bootstrap/bootstrap.js

@lunny commented on GitHub (Nov 5, 2019): ~I think you can already do that, i.e. https://gitea.com/grafana/grafana/raw/branch/master/public/vendor/bootstrap/bootstrap.js~
Author
Owner

@stale[bot] commented on GitHub (Jan 4, 2020):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 4, 2020): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@csarn commented on GitHub (Jun 3, 2022):

I just wanted to say that there are other people out there (i.e. me) that would like to have this feature :)

@csarn commented on GitHub (Jun 3, 2022): I just wanted to say that there are other people out there (i.e. me) that would like to have this feature :)
Author
Owner

@techknowlogick commented on GitHub (Jun 3, 2022):

folding this into https://github.com/go-gitea/gitea/issues/16670

@techknowlogick commented on GitHub (Jun 3, 2022): folding this into https://github.com/go-gitea/gitea/issues/16670
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3910