|
5 | 5 | ---
|
6 | 6 | # Github
|
7 | 7 |
|
8 |
| -The settings for this plugin can be accessed like other plugins. |
| 8 | +These settings an be accessed via the **Gistr Plugin Settings**. |
9 | 9 |
|
10 |
| - Open Obsidian Settings ⚙️ interface |
11 |
| - Select Community Plugins in left menu |
12 |
| - Locate Gistr plugin, and click Settings ⚙️ icon |
| 10 | +- Open Obsidian Settings ⚙️ interface |
| 11 | +- Select Community Plugins in left menu |
| 12 | +- Locate Gistr plugin, and click Settings ⚙️ icon |
13 | 13 |
|
| 14 | +<figure markdown="span"> |
| 15 | + { width="100%" } |
| 16 | + <figcaption>Gistr > Settings > Github</figcaption> |
| 17 | +</figure> |
14 | 18 |
|
15 |
| -## How functions work |
| 19 | +<br /> |
16 | 20 |
|
| 21 | +--- |
| 22 | + |
| 23 | +<br /> |
| 24 | + |
| 25 | +## Personal Access Token |
| 26 | +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. |
| 27 | + |
| 28 | +<br /> |
| 29 | + |
| 30 | +```embed |
| 31 | +url: https://github.com/settings/tokens?type=beta |
| 32 | +name: Github: Create Token |
| 33 | +image: https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png |
| 34 | +``` |
| 35 | + |
| 36 | +<br /> |
| 37 | + |
| 38 | +Visit the link above, ensure you are signed in to Github. |
| 39 | + |
| 40 | +<br /> |
| 41 | + |
| 42 | +<figure markdown="span"> |
| 43 | + { width="100%" } |
| 44 | + <figcaption>Generate new fine-grained token</figcaption> |
| 45 | +</figure> |
| 46 | + |
| 47 | +<br /> |
| 48 | + |
| 49 | +Click **Generate New Token** |
| 50 | + |
| 51 | +<br /> |
| 52 | + |
| 53 | +<figure markdown="span"> |
| 54 | + { width="100%" } |
| 55 | + <figcaption>Provide fine-grained token name and description</figcaption> |
| 56 | +</figure> |
| 57 | + |
| 58 | +<br /> |
| 59 | + |
| 60 | +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. |
| 61 | + |
| 62 | +<br /> |
| 63 | + |
| 64 | +When everything is filled out, scroll down to **Repository Access**: |
| 65 | + |
| 66 | +<figure markdown="span"> |
| 67 | + { width="100%" } |
| 68 | + <figcaption>Target repository selection</figcaption> |
| 69 | +</figure> |
| 70 | + |
| 71 | +<br /> |
| 72 | + |
| 73 | +Select `All Repositories` |
| 74 | + |
| 75 | +<br /> |
| 76 | + |
| 77 | +You will need to apply the following permission changes under the two sections. |
| 78 | + |
| 79 | +| Category | Permission Name | Set To | |
| 80 | +| --- | --- | --- | |
| 81 | +| `Account Permissions` | Gists | `Read-and-write` | |
| 82 | +| `Repository Permissions` | Pull Requests | `Read-only` | |
| 83 | +| `Repository Permissions` | Contents | `Read-only` | |
| 84 | +| `Repository Permissions` | Issues | `Read-only` | |
| 85 | + |
| 86 | +<br /> |
| 87 | + |
| 88 | +You should have the following when you scroll to the bottom: |
| 89 | + |
| 90 | +<figure markdown="span"> |
| 91 | + { width="100%" } |
| 92 | + <figcaption>Github token permission requirements</figcaption> |
| 93 | +</figure> |
| 94 | + |
| 95 | +<br /> |
| 96 | + |
| 97 | +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` |
| 98 | + |
| 99 | +<br /> |
| 100 | + |
| 101 | +After confirming the permissions, click **Generate Token** |
| 102 | + |
| 103 | +<figure markdown="span"> |
| 104 | + { width="100%" } |
| 105 | + <figcaption>Creating a fine-grained Github token</figcaption> |
| 106 | +</figure> |
| 107 | + |
| 108 | +<br /> |
| 109 | + |
| 110 | +Your new personal access token will be generated. Copy this token somewhere secure such as in a password manager like Bitwarden or KeePassXC. |
| 111 | + |
| 112 | +<br /> |
| 113 | + |
| 114 | +Next, launch Obsidian and click the Settings Cog Icon ⚙️. On the left, select Community Plugins and find the `Gistr` plugin. |
| 115 | + |
| 116 | +<br /> |
| 117 | + |
| 118 | +Ensure Gistr is enabled by clicking the <img src="https://github.com/Aetherinox/obsidian-gistr/assets/118329232/3e512f8a-5c7d-4bff-a3e8-3ef88e673e72" data-canonical-src="https://github.com/Aetherinox/obsidian-gistr/assets/118329232/3e512f8a-5c7d-4bff-a3e8-3ef88e673e72" height=20px /> toggle icon, and then click the cog icon ⚙️ to access the plugin settings. |
| 119 | + |
| 120 | +<br /> |
| 121 | + |
| 122 | +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. |
| 123 | + |
| 124 | +<br /> |
| 125 | + |
| 126 | +<figure markdown="span"> |
| 127 | + { width="100%" } |
| 128 | + <figcaption>Enter and apply github token</figcaption> |
| 129 | +</figure> |
| 130 | + |
| 131 | +<br /> |
| 132 | + |
| 133 | +You should also see a notification if your token has been accepted and applied: |
| 134 | + |
| 135 | +<figure markdown="span"> |
| 136 | + { width="100%" } |
| 137 | + <figcaption>Valid Github Token detected</figcaption> |
| 138 | +</figure> |
| 139 | + |
| 140 | +You are now ready to create and update gists to Github. |
| 141 | + |
| 142 | +<br /> |
| 143 | + |
| 144 | +## Codeblock Background Color |
| 145 | +These settings allow you to adjust the overall background color of the codeblock. The setting is broken up into two schemes; **light** and **dark**. |
| 146 | + |
| 147 | +<br /> |
| 148 | + |
| 149 | +<figure markdown="span"> |
| 150 | + { width="100%" } |
| 151 | + <figcaption>Codeblock Background Color (Light)</figcaption> |
| 152 | +</figure> |
| 153 | + |
| 154 | + |
| 155 | +<figure markdown="span"> |
| 156 | + { width="100%" } |
| 157 | + <figcaption>Codeblock Background Color (Dark)</figcaption> |
| 158 | +</figure> |
| 159 | + |
| 160 | +<br /> |
| 161 | + |
| 162 | +## Codeblock Text Color |
| 163 | +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**. |
| 164 | + |
| 165 | +<br /> |
| 166 | + |
| 167 | +## Codeblock Scrollbar Track Color |
| 168 | +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**. |
| 169 | + |
| 170 | +<br /> |
| 171 | + |
| 172 | +## Codeblock Opacity |
| 173 | +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. |
| 174 | + |
| 175 | +| Value | Percentage | Note | |
| 176 | +| --- | --- | --- | |
| 177 | +| `0` | 0% | completely invisible | |
| 178 | +| `0.25` | 25% | one quarter 1/4 visible | |
| 179 | +| `0.50` | 50% | one half 1/2 as visibile as normal | |
| 180 | +| `1` | 100% | completely visible | |
| 181 | + |
| 182 | +<br /> |
| 183 | + |
| 184 | + |
| 185 | +--- |
| 186 | + |
| 187 | +<br /> |
0 commit comments