Skip to content

Add Github permalink support #7

Open
@OriR

Description

@OriR

Having this plugin analyze Github permalinks would be great if you want to reference an existing code in a repo!

One way I thought it could be implemented was that instead of supplying the user & gist hash you could just point to a specific url and download the contents of it (keeping the highlighted rows search as is).

Something like
gist:https://github.com/weirdpattern/gatsby-remark-embed-gist/blob/66bb462203a990cdba85ea594c1cc1431845cba0/src/index.js#L29-L34

If there are no highlighted rows just preview the entire file.
If the entire file or the amount of highlighted rows is too big, show only a certain number of lines, let's say 15 (allow the user to configure this number in gatsby-config.js).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions