Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Sanity.io plugin to include content from Github repositories & gists

License

Notifications You must be signed in to change notification settings

ringods/sanity-plugin-github

Repository files navigation

Sanity + Github

Installation

sanity install github

Usage

Declare a field to be github.gist in your schema

    {
      type: "github.gist",
      name: "gist",
      description: "Reference to a Github Gist",
    }

Content

Here is an example of which data is stored on your document after selecting an asset.

{
    "public_id": "29b4a88182b4cb50330011d23a29bcb371bd5886-2400x1344_lzcx7x",
    "resource_type": "github.gist",
    "type": "gist",
    "id": "f97ef303ba04cee4975e6fdfc672ac12",
    "file": "kops-cluster.yaml",
    "_version": 1,
    "_type": "github.gist"
  }

Note: The _version in the data here refers to the schema version of this plugin, should the way it stores the data from Github change in the future.

About

Sanity.io plugin to include content from Github repositories & gists

Topics

Resources

License

Stars

Watchers

Forks