How can I obtain an embeddable link from any Github resource using Webflow?

TL;DR
  • Locate the GitHub resource, generate the embeddable link by copying the URL from the "Raw" button or full image view, then embed it in Webflow using an Embed element. 
  • Paste the URL within an <iframe> tag, adjust attributes as needed, and use an Image element for images or the gist script for gists.

To obtain an embeddable link from any GitHub resource and use it within Webflow, you'll need to follow a few steps to ensure it displays correctly.

1. Locate the GitHub Resource

  • Go to the GitHub repository containing the resource you want to embed.
  • Identify the specific file or content you wish to embed.

2. Generate the Embeddable Link

  • For code files, open the file and click the "Raw" button. Copy the URL in the address bar; this is your raw file's direct link.
  • For specific repository pages or visuals, such as images, click to view the full image and copy the URL in the address bar.

3. Embed the Link in Webflow

  • Open Webflow and navigate to the page where you want to place the embed.
  • Use an Embed Element: Drag an embed component from the Add panel to your desired location on the page.
  • Paste the URL within an <iframe> tag (for specific use cases):
  • Format: <iframe src="YOUR_LINK" width="800" height="600" loading="lazy"></iframe>
  • Adjust the width, height, and other attributes as needed to fit your design.

4. Modify for Content Type

  • For images, you might choose an Image element instead of an embed and set its source URL directly.
  • If embedding a gist, copy the embed script from GitHub Gist's share options and paste it into the Webflow Embed element.

Summary

To embed a GitHub resource in Webflow, obtain the direct link from GitHub, use an Embed element in Webflow, and paste the link using an appropriate HTML tag, adjusting attributes to fit your design needs. Use direct image URLs for images or the gist script for gists.

Rate this answer

Other Webflow Questions