标签:Core use sudo repository Typora gitee How install picgo
How to use Typora efficiently on Ubuntu
Environment
What we need?
- Typora —— a markdown editor
- Picgo-Core —— a tool for image uploading
- gitee repository —— images repository
Get your personal token for gitee repository
Don't forget to save it(gitee personal token) in your device.
Installation for Picgo-Core
Before installing Picgo-Core, we need to install Nodejs.
Installation for Nodejs
# install nodejs and npm
sudo apt install nodejs -y
sudo apt install npm -y
# check installation result
node -v
npm -v
Installation for Picgo-Core
# install cnpm
sudo npm install -g cnpm
# before installing Picgo-Core, we need use an image source for npm to accelarate downloading
npm install express --registry=https://registry.npm.taobao.org
# use cnpm to install Picgo-Core
sudo cnpm install picgo -g
Installation for picgo-plugin-gitee-uploader
# install gitee-uploader plugin
picgo install gitee-uploader
Picgo-Core Configuration
# enter the root of picgo configuration file
cd ~/.picgo/
# modify the configuration of config.json
vim config.json
config.json
{
"picBed": {
"current": "gitee",
"uploader": "gitee",
"smms": {
"token": ""
},
"gitee": {
"message": "added a picture",
"owner": "gitee_username",
"branch": "master",
"path": "images_folder_path",
"repo": "gitee_username/repository_name",
"token": "personal token for gitee repository"
}
},
"picgoPlugins": {
"picgo-plugin-gitee-uploader": true
},
"picgo-plugin-gitee-uploader": {
"lastSync": "2021-11-25 04:11:52"
}
}
Installation for Typora
Installation
# get public-key
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
# add Typora's repository
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update
# install typora
sudo apt-get install typora
Configuration
Use Custom Command Mode to upload image to gitee repository by Picgo-Core
# set uploading instruction
/usr/local/lib/nodejs/bin/node /usr/lib/node_modules/picgo/bin/picgo upload
Then, let's verify the availability of uploading service..
Now, you can enjoy the convenience of automatic image uploading service.
标签:Core,use,sudo,repository,Typora,gitee,How,install,picgo 来源: https://www.cnblogs.com/caoyusang/p/15603687.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。