Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
hexo-image-path-for-white
Advanced tools
When enabled hexo `post_asset_folder: true`, convert the markdown image path to asset_img syntax, to make the image display both in typora and hexo.
When enabled hexo post_asset_folder: true
, convert the markdown image path to asset_img syntax, to make the image display both in typora and hexo.
![image file label](./markdown-file-name/local-image.png)
-> {% asset_img label local-image.png %}
在Hexo启用post_asset_folder: true
选项后,将Markdown语法的图片路径转换为asset_img的方式,使图片能够在使用typora编辑和hexo预览发布时都能正常显示。
网上很多资料提示使用 hexo-asset-image
插件,但是在 hexo 4.2.0
环境下,生成的路径不对,如下:
update link as:-->/.cn//Screenshot-150-1-20200314081849804.png
update link as:-->/.cn//image-20200314080935503.png
$ npm install hexo-image-link --save
Enable hexo-asset-folder: true
.
$ hexo new 20200315-es-monitoring-guide
INFO Created: ~/Projects/hexo-blog/blog/source/_posts/20200315-es-monitoring-guide.md
$ ls -lh source/_posts/
total 56
drwxr-xr-x@ 9 shiqiang staff 288B 3 15 10:28 ./
drwx------+ 32 shiqiang staff 1.0K 3 14 07:52 ../
drwxr-xr-x@ 2 shiqiang staff 64B 3 15 10:28 20200315-es-monitoring-guide/
-rw-r--r--@ 1 shiqiang staff 76B 3 15 10:28 20200315-es-monitoring-guide.md
Edit Markdown and insert image.
![label](./20200315-es-monitoring-guide/image-name.jpg)
Then generate public files.
$ hexo generate
FAQs
When enabled hexo `post_asset_folder: true`, convert the markdown image path to asset_img syntax, to make the image display both in typora and hexo.
We found that hexo-image-path-for-white demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.