Skip to content

Commit 64212d2

Browse files
committed
docs: update
1 parent a421cc4 commit 64212d2

File tree

4 files changed

+191
-15
lines changed

4 files changed

+191
-15
lines changed

docs/docs/settings/github.md

Lines changed: 176 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,183 @@ tags:
55
---
66
# Github
77

8-
The settings for this plugin can be accessed like other plugins.
8+
These settings an be accessed via the **Gistr Plugin Settings**.
99

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
1313

14+
<figure markdown="span">
15+
![Gistr > Settings > Github](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/bc48cfaa-91d4-4e1a-a784-286f527a6037){ width="100%" }
16+
<figcaption>Gistr > Settings > Github</figcaption>
17+
</figure>
1418

15-
## How functions work
19+
<br />
1620

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+
![Generate new fine-grained token](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/98f6fb92-cf52-4a4b-9fe6-63d98b92590c){ 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+
![Provide fine-grained token name and description](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/270f9e01-e6ba-4174-966f-4ee15b6f53d5){ 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+
![Target repository selection](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/3a95342f-85f7-4d2f-b536-078e9c451c1e){ 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+
![Github token permission requirements](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/5397e63e-3979-4560-a70d-2a20a515a457){ 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+
![Creating a fine-grained Github token](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/dacbb39e-f5ed-4a3a-9a65-4924bf365611){ 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+
![Enter and apply github token](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/3c00e83e-09e4-4d59-a586-97aadbc9dcb5){ 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+
![Valid Github Token detected](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/313d46fd-5d9e-40db-acfa-cf717dd3fa20){ 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+
![Codeblock Background Color (Light)](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/e4f1bdb8-8ddd-4143-b7d5-5a9835feb083){ width="100%" }
151+
<figcaption>Codeblock Background Color (Light)</figcaption>
152+
</figure>
153+
154+
155+
<figure markdown="span">
156+
![Codeblock Background Color (Dark)](https://github.com/Aetherinox/obsidian-gistr/assets/118329232/92c1edf1-4351-402c-b01f-3926b527392d){ 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 />

tests/Gistr Demo/.obsidian/plugins/gistr/data.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"blk_pad_b": 18,
99
"textwrap": "Enabled",
1010
"notitime": 10,
11+
"ge_enable_updatenoti": true,
1112
"sy_clr_lst_icon": "#757575E6",
1213
"og_clr_bg_light": "#CBCBCB",
1314
"og_clr_bg_dark": "#121315",
@@ -17,17 +18,22 @@
1718
"og_clr_tx_dark": "#CAD3F5",
1819
"og_opacity": 1,
1920
"gh_clr_bg_light": "#E5E5E5",
20-
"gh_clr_bg_dark": "#121315",
21+
"gh_clr_bg_dark": "#18191C",
2122
"gh_clr_sb_light": "#BA4956",
2223
"gh_clr_sb_dark": "#BA496A",
2324
"gh_clr_tx_light": "#2A2626",
2425
"gh_clr_tx_dark": "#CAD3F5",
2526
"gh_opacity": 1,
27+
"sy_enable_ribbon_icons": true,
2628
"sy_enable_autoupdate": true,
2729
"sy_enable_autosave": false,
2830
"sy_enable_autosave_strict": false,
2931
"sy_enable_autosave_notice": false,
3032
"sy_add_frontmatter": false,
33+
"sy_save_list_showall": false,
34+
"sy_save_list_datetime": "MM.DD.YYYY h:m:s a",
3135
"sy_save_duration": 15,
32-
"context_sorting": []
36+
"context_sorting": [],
37+
"portals": {},
38+
"uuid": ""
3339
}

tests/Gistr Demo/.obsidian/workspace.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"state": {
3838
"type": "markdown",
3939
"state": {
40-
"file": "4. Mermaid Charts & Advanced Embeds.md",
40+
"file": "2. Github.md",
4141
"mode": "source",
4242
"source": false
4343
}
@@ -110,7 +110,7 @@
110110
"state": {
111111
"type": "backlink",
112112
"state": {
113-
"file": "4. Mermaid Charts & Advanced Embeds.md",
113+
"file": "2. Github.md",
114114
"collapseAll": false,
115115
"extraContext": true,
116116
"sortOrder": "alphabetical",
@@ -127,7 +127,7 @@
127127
"state": {
128128
"type": "outgoing-link",
129129
"state": {
130-
"file": "4. Mermaid Charts & Advanced Embeds.md",
130+
"file": "2. Github.md",
131131
"linksCollapsed": false,
132132
"unlinkedCollapsed": true
133133
}
@@ -150,7 +150,7 @@
150150
"state": {
151151
"type": "outline",
152152
"state": {
153-
"file": "4. Mermaid Charts & Advanced Embeds.md"
153+
"file": "2. Github.md"
154154
}
155155
}
156156
}
@@ -176,10 +176,10 @@
176176
},
177177
"active": "fd79962cd61072a6",
178178
"lastOpenFiles": [
179+
"1. Methods.md",
179180
"2. Github.md",
180-
"4. Mermaid Charts & Advanced Embeds.md",
181181
"3. OpenGist.md",
182-
"0. Official Documentation.md",
183-
"1. Methods.md"
182+
"4. Mermaid Charts & Advanced Embeds.md",
183+
"0. Official Documentation.md"
184184
]
185185
}

tests/Gistr Demo/2. Github.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ theme: dark
2727
https://gist.github.com/Aetherinox/cbb70244bdd1aeca236a7f4a19cb1aa1&dark
2828
```
2929
````
30-
3130
```gistr
3231
https://gist.github.com/Aetherinox/cbb70244bdd1aeca236a7f4a19cb1aa1&dark
3332
```

0 commit comments

Comments
 (0)