This is a plugin to render the GitHub Gist in Obsidian.
The gist
fenced code blocks will be rendered as a embed Gist view.
- With only the Gist ID:
```gist
30efbfd874fb1a16176d3f638a1e712a
```
- With the username and Gist ID:
```gist
linjunpop/30efbfd874fb1a16176d3f638a1e712a
```
- Specify to only show a single file in the Gist:
```gist
linjunpop/30efbfd874fb1a16176d3f638a1e712a#math.ex
30efbfd874fb1a16176d3f638a1e712a#concat.ex
```
Search "Gist" in Settings -> Community plugins, you can find and install this plugin.
You can check https://help.obsidian.md/Advanced+topics/Third-party+plugins#Discover+and+install+community+plugins for an official guide.
Find the latest release: https://github.com/linjunpop/obsidian-gist/releases, then copy over main.js
, manifest.json
, styles.css
to your vault's .obsidian/plugins/obsidian-gist
directory (ex. VaultFolder/.obsidian/plugins/obsidian-gist/
).
- Clone this repo to a local development folder. For convenience, you can place this folder in your
.obsidian/plugins/obsidian-gist
folder. - Install NodeJS, then run
npm i
in the command line under your repo folder. - Run
npm run dev
to compile your plugin frommain.ts
tomain.js
. - Make changes to
main.ts
(or create new.ts
files). Those changes should be automatically compiled intomain.js
. - Reload Obsidian to load the new version of your plugin.
- Enable plugin in settings window.
- Update the
manifest.json
with a new version number, such as1.0.1
, and the minimum Obsidian version required for your latest release. - Update the
versions.json
file with"new-plugin-version": "minimum-obsidian-version"
so older versions of Obsidian can download an older version of your plugin that's compatible. - Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix
v
. - Upload the files
manifest.json
,main.js
,styles.css
as binary attachments. - Publish the release.