npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

picgo-plugin-folder-name

v1.0.0

Published

Use part of the local address of the file as part of the cloud address - 将文件的部分本地地址,作为部分云端地址

Downloads

33

Readme

picgo-plugin-folder-name

version license downloads fork

Use part of the local address of the file as part of the cloud address.

将文件的部分本地地址,作为部分云端地址。便于分文件夹管理文件。

一、示例

本地文件地址为 /blog/picgo/assets/logo.png ,则通过配置,云端地址可为 /imgs/picgo/logo.png。其中 imgsuploader 的自定义图床存储路径, picgo 是文章名称。

将文件的父文件夹名称 picgo 自动设置为一层地址,并忽略 assets 这一层。

开发此插件起始原因:

使用 Typora 书写 Markdown 文章,配置好图片上传服务后,移入的图片会通过 PicGo 自动上传至云端,地址随后改为云端地址。

我的每篇文章为独立文件夹,内部 index.md 为主内容,assets 用来存放图片。为了便于管理每一篇文章图片,需要对应文章的图片在对应的文件夹下,自己不想每次手动配置存储路径,所以开发了此插件。

二、安装

1. 命令行 CLI

picgo install folder-name

2. 界面 GUI

在 PicGo 插件设置内搜索 folder-name

3. 离线安装

命令行或者界面均可这样离线安装,会在对应 node_modules 内建立一个快捷方式到克隆的项目内。

需要注意 npm 命令的调用位置,CLI 存储地址GUI 存储地址不同。

git clone https://github.com/evgo2017/picgo-plugin-folder-name
// 到对应安装目录
npm install [clone后的本地项目地址]

三、配置

1. 配置项

| 配置项 | 类型 | 含义 | 默认值 | 示例 | | ------ | ------ | -------------------------- | ------ | ------------- | | height | Number | 向上层数,包含几层父文件夹 | 1 | 0 | | ignore | String | 忽略名称,空格隔开多个名称 | "" | assets public |

2. 详细解释

若文件路径中某文件夹的名称,存在于 ignore 配置项中,则会自动忽略,并不加入 height 层数的计算,可查看示例。

height 为 0,则不会包含其父文件夹名称,插件此时不进行任何操作。

3. 修改配置

① 命令行修改

picgo set folder-name

② GUI 修改

在 PicGo 的插件设置中,点击此插件的右下角,选择配置plugin - folder-name即可,可参考插件设置

③ 配置文件

修改配置文件。

"picgoPlugins": {
  "picgo-plugin-folder-name": true
},
"picgo-plugin-folder-name": {
  "height": "1",
  "ignore": "assets"
}

四、最后

若有问题,请先查阅以下相关文档,最后欢迎提 issues

MIT © Evgo2017