mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-15 19:45:46 +08:00
improves github layer readme (#2636)
* improves github layer readme - fixes a few grammatical issues - adds a link to github's personal access token page * point folks to help doc instead of private page
This commit is contained in:
parent
2209ef75c3
commit
e05a364225
@ -20,7 +20,7 @@ This layer provides GitHub integration for SpaceVim.
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
To use this configuration layer, add following snippet to your custom configuration file.
|
To use this configuration layer, add the following snippet to your custom configuration file.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[layers]]
|
[[layers]]
|
||||||
@ -42,7 +42,7 @@ To use this configuration layer, add following snippet to your custom configurat
|
|||||||
|
|
||||||
## Extra configuration for GitHub and Gist
|
## Extra configuration for GitHub and Gist
|
||||||
|
|
||||||
For avoid repeating input the account name and passwrod, you need to add the belowing contennt for auto .SpaceVim.d/autoload/myspacevim.vim [Bootstrap Functions](https://spacevim.org/documentation/#bootstrap-functions).
|
To avoid needing to constantly input your username and password, you'll want to create the following [Bootstrap Function](https://spacevim.org/documentation/#bootstrap-functions) in a file such as .SpaceVim.d/autoload/myspacevim.vim.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
func! myspacevim#before() abort
|
func! myspacevim#before() abort
|
||||||
@ -51,7 +51,7 @@ func! myspacevim#before() abort
|
|||||||
let g:gista#client#default_username = 'monkeyxite'
|
let g:gista#client#default_username = 'monkeyxite'
|
||||||
endf
|
endf
|
||||||
```
|
```
|
||||||
Refer [github dashboard](https://github.com/junegunn/vim-github-dashboard), for security concerns you could create a Personal Access Token, export it as an environment variable and use it as a password.
|
We recommend generating a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) and storing it securely in an environment variable. [Refer to github dashboard](https://github.com/junegunn/vim-github-dashboard) for more information.
|
||||||
```shell
|
```shell
|
||||||
# in some secure file sourced in your .bashrc, .bash_profile, .zshrc, etc.
|
# in some secure file sourced in your .bashrc, .bash_profile, .zshrc, etc.
|
||||||
export GITHUB_TOKEN="<your 40 char token>"
|
export GITHUB_TOKEN="<your 40 char token>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user