Github¶
These settings an be accessed via the Gistr Plugin Settings.
- Open Obsidian Settings ⚙️ interface
- Select Community Plugins in left menu
- Locate Gistr plugin, and click Settings ⚙️ icon
- Click the Github tab
Personal Access Token¶
1.3.0
none
The Personal Access Token is a token given to you by Github which allows you to access your Github account from 3rd party services such as Obsidian.md. If you are simply reading gists from within your Obsidian notes; you do not need a Github token, however, if you want to make use of the feature to create and update gists from Obsidian to Github; you must have a Github token linked to the Gistr Github settings.
url: https://github.com/settings/tokens?type=beta
name: Github: Create Token
image: https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png
Visit the link above, ensure you are signed in to Github.
Click Generate New Token
Fill in the top part of the form with information similar to what is provided in the screenshot above. For the Expiration; you are only allowed to specify a max of 1 year in the future. So be aware that in one year, you must come back to this page, and create a new token.
When everything is filled out, scroll down to Repository Access:
Select All Repositories
You will need to apply the following permission changes under the two sections.
Category | Permission Name | Set To |
---|---|---|
Account Permissions |
Gists | Read-and-write |
Repository Permissions |
Pull Requests | Read-only |
Repository Permissions |
Contents | Read-only |
Repository Permissions |
Issues | Read-only |
You should have the following when you scroll to the bottom:
Be aware that the permission Metadata
is manditory, so it will automatically be granted permission when you enable the others. It should be set to Read-Only
After confirming the permissions, click Generate Token
Your new personal access token will be generated. Copy this token somewhere secure such as in a password manager like Bitwarden or KeePassXC.
Next, launch Obsidian and click the Settings Cog Icon ⚙️. On the left, select Community Plugins and find the Gistr
plugin.
Ensure Gistr is enabled by clicking the toggle icon, and then click the cog icon ⚙️ to access the plugin settings.
Click the Github tab in the Gistr plugin settings, and navigate to the Personal Access Token textbox. You will need to paste your token here.
You should also see a notification if your token has been accepted and applied:
You are now ready to create and update gists to Github.
Codeblock Background Color¶
1.2.0
#E5E5E5 | #121315
These settings allow you to adjust the overall background color of the codeblock. The setting is broken up into two schemes; light and dark.
Codeblock Text Color¶
1.2.0
#2A2626 | #CAD3F5
These settings allow you to adjust the overall text color of the codeblock. This is the color of text that is not affected by syntax highlighting; which is dependent on the language the codeblock is written for. The setting is broken up into two schemes; light and dark.
Codeblock Scrollbar Track Color¶
1.2.0
#BA4956 | #4960BA
These settings allow you to adjust the color of the horizontal scrollbar which appears within codeblocks which have scrolling enabled, or the text exceeds the width of the codeblock. The setting is broken up into two schemes; light and dark.
Codeblock Opacity¶
1.3.0
1
This setting allow you to adjust the opacity / transparency of the codeblocks. Acceptable values are between 0
- 1
, with numbers in the middle being decimals.
Value | Percentage | Note |
---|---|---|
0 |
0% | completely invisible |
0.25 |
25% | one quarter ¼ visible |
0.50 |
50% | one half ½ as visibile as normal |
1 |
100% | completely visible |
Custom CSS¶
1.0.0
none
This setting allows you to override the default CSS for Github and use your own color scheme.