{"id":13794268,"url":"https://github.com/evgo2017/picgo-plugin-folder-name","last_synced_at":"2026-02-18T03:10:03.218Z","repository":{"id":57323662,"uuid":"271044703","full_name":"evgo2017/picgo-plugin-folder-name","owner":"evgo2017","description":"Use part of the local address of the file as part of the cloud address - 将文件的部分本地地址，作为部分云端地址","archived":false,"fork":false,"pushed_at":"2021-04-13T15:53:30.000Z","size":51,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T04:13:13.744Z","etag":null,"topics":["picgo","picgo-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evgo2017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-09T15:48:42.000Z","updated_at":"2024-11-13T07:03:51.000Z","dependencies_parsed_at":"2022-09-04T12:52:29.283Z","dependency_job_id":null,"html_url":"https://github.com/evgo2017/picgo-plugin-folder-name","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evgo2017/picgo-plugin-folder-name","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Fpicgo-plugin-folder-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Fpicgo-plugin-folder-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Fpicgo-plugin-folder-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Fpicgo-plugin-folder-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evgo2017","download_url":"https://codeload.github.com/evgo2017/picgo-plugin-folder-name/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Fpicgo-plugin-folder-name/sbom","scorecard":{"id":386697,"data":{"date":"2025-08-11","repo":{"name":"github.com/evgo2017/picgo-plugin-folder-name","commit":"d43404b21b74031dda6b91ea90cfb6da27722ab1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T16:48:36.128Z","repository_id":57323662,"created_at":"2025-08-18T16:48:36.129Z","updated_at":"2025-08-18T16:48:36.129Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["picgo","picgo-plugin"],"created_at":"2024-08-03T23:00:37.916Z","updated_at":"2026-02-18T03:09:58.209Z","avatar_url":"https://github.com/evgo2017.png","language":"JavaScript","funding_links":[],"categories":[":rocket: Plugin for PicGo"],"sub_categories":[],"readme":"## picgo-plugin-folder-name\n\n[![version](https://img.shields.io/npm/v/picgo-plugin-folder-name)](https://npm.js) ![license](https://img.shields.io/github/license/evgo2017/picgo-plugin-folder-name) [![downloads](https://img.shields.io/npm/dt/picgo-plugin-folder-name)](\u003chttps://www.npmjs.com/package/picgo-plugin-folder-name\u003e ) [![fork](https://img.shields.io/github/forks/evgo2017/picgo-plugin-folder-name?style=social)](https://github.com/evgo2017/picgo-plugin-folder-name)\n\nUse part of the local path as part of the cloud path.\n\n将部分本地路径，作为部分云端路径。便于分文件夹管理文件。\n\n![picgo-plugin-folder-name](assets/picgo-plugin-folder-name.png)\n\n上图通过配置，包含 PNG 图片的向上 1 层路径，但遇到 `assets` 时不计入已向上层数。其中 `imgs` 是云端路径， `picgo` 是本地路径。\n\n## 一、示例\n\n以下目录结构作为示例：\n\n```\nRepos\n└─ picgo-plugin-folder-name\n\t└─ test\n\t\t│-README.md\n\t\t└─assets\n    \t\t*evgo2017.png\n```\n\n将图片拉入 md 文件，此时图片路径为 assets/evgo2017.png。修改插件相关参数，以下为图片路径变化的测试结果：\n\n| 序号 | 向上层数 | 忽略名称    | 结果                                                  |\n| ---- | -------- | ----------- | ----------------------------------------------------- |\n| 1    | 空       | 空          | xxx/evgo2017.png                                      |\n| 2    | 空       | assets      | xxx/evgo2017.png                                      |\n| 3    | 空       | assets test | xxx/evgo2017.png                                      |\n| 4    | 1        | 空          | xxx/assets/evgo2017.png                               |\n| 5    | 2        | 空          | xxx/test/assets/evgo2017.png                          |\n| 6    | 3        | 空          | xxx/picgo-plugin-folder-name/test/assets/evgo2017.png |\n| 7    | 1        | assets      | xxx/test/evgo2017.png                                 |\n| 8    | 2        | assets      | xxx/picgo-plugin-folder-name/test/evgo2017.png        |\n| 9    | 3        | assets      | xxx/Repos/picgo-plugin-folder-name/test/evgo2017.png  |\n\n## 二、安装\n\n### 1. 命令行 CLI\n\n```\npicgo install folder-name\n```\n\n### 2. 界面 GUI\n\n在 PicGo 插件设置内搜索 `folder-name`\n\n### 3. 离线安装\n\n命令行或者界面均可这样离线安装，会在对应 `node_modules` 内建立一个快捷方式到克隆的项目内。\n\n需要注意 `npm` 命令的调用位置，[CLI 存储地址](https://picgo.github.io/PicGo-Core-Doc/zh/guide/config.html#默认配置文件)与 [GUI 存储地址](https://picgo.github.io/PicGo-Doc/zh/guide/config.html)不同。\n\n```\ngit clone https://github.com/evgo2017/picgo-plugin-folder-name\n// 到对应安装目录\nnpm install [clone后的本地项目地址]\n```\n\n## 三、配置\n\n### 1. 配置项\n\n| 配置项 | 类型   | 含义                       | 默认值 |\n| ------ | ------ | -------------------------- | ------ |\n| height | Number | 向上层数，包含几层父文件夹 | 1      |\n| ignore | String | 忽略名称，空格隔开多个名称 | 空     |\n\n###  2. 详细解释\n\n若 `height` 为 0，则不会包含其父文件夹名称，插件此时不进行任何操作。\n\n若文件路径中某文件夹的名称，存在于 `ignore` 配置项中，则会自动忽略，不加入 `height` 层数的计算，可查看示例。\n\n### 3. 修改配置\n\n#### ① 命令行修改\n\n```\npicgo set folder-name\n```\n\n#### ② GUI 修改\n\n在 PicGo 的插件设置中，点击此插件的右下角，选择`配置plugin - folder-name`即可，可参考[插件设置](https://picgo.github.io/PicGo-Doc/zh/guide/config.html#配置)。\n\n#### ③ 配置文件\n\n修改配置文件。\n\n```json\n\"picgoPlugins\": {\n  \"picgo-plugin-folder-name\": true\n},\n\"picgo-plugin-folder-name\": {\n  \"height\": \"1\",\n  \"ignore\": \"assets\"\n}\n```\n\n## 四、最后\n\n### 1） 开发此插件起始原因\n\n我的每篇文章为独立文件夹，内部 `README.md` 为主内容，`assets` 用来存放图片，可参考 `test` 文件夹结构。为了便于管理每一篇文章图片，需要对应文章的图片在对应的文件夹下，但不需要 `assets` 这一层。\n\n使用 Typora 书写 Markdown 文章，配置好图片上传服务后，移入的图片会通过 PicGo 自动上传至云端，地址随后改为云端地址，自己不想每次手动配置存储路径，所以开发了此插件。\n\n### 2）我的 Typora 图像设置\n\n![typora-image-setting](assets/typora-image-setting.png)\n\n### 3）联系方式\n\n若有问题，请先查阅以下相关文档，最后欢迎提 [issues](https://github.com/evgo2017/picgo-plugin-folder-name/issues)，或发邮件至 evgo2017@qq.com。\n\n欢迎到我的个人网站 https://evgo2017.com/repo 浏览其他项目。也许你会对这款 Typora 主题 [typora-theme-orange-heart](https://evgo2017.com/repo/typora-theme-orange-heart) 感兴趣。\n\n### 4）参考文档\n\n* [PicGo-Core 文档](https://picgo.github.io/PicGo-Core-Doc/zh/)\n\n* [PicGo](https://picgo.github.io/PicGo-Doc/)\n\n* [插件搜集](https://github.com/PicGo/Awesome-PicGo)\n\nMIT © Evgo2017","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgo2017%2Fpicgo-plugin-folder-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgo2017%2Fpicgo-plugin-folder-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgo2017%2Fpicgo-plugin-folder-name/lists"}