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.
vitepress-plugin-image-viewer
Advanced tools
EN | 中文文档
A vitepress image viewer plugin based on viewerjs
// npm
npm i vitepress-plugin-image-viewer
// yarn
yarn add vitepress-plugin-image-viewer
// .vitepress/theme/index.js
import DefaultTheme from 'vitepress/theme';
import 'viewerjs/dist/viewer.min.css';
import imageViewer from 'vitepress-plugin-image-viewer';
import vImageViewer from 'vitepress-plugin-image-viewer/lib/vImageViewer.vue';
import { useRoute } from 'vitepress';
export default {
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx);
// Register global components, if you don't want to use it, you don't need to add it
ctx.app.component('vImageViewer', vImageViewer);
// ...
},
setup() {
// Get route
const route = useRoute();
// Using
imageViewer(route);
}
};
imageViewer()
takes three parameters:
route
route (this is required)
el
CSS selector (Default .vp-doc img
, can be empty, this is not required)
option
Configuration options (For detailed configuration, please refer to viewerjs option, there is already a default configuration, which is not required)
vImageViewer
component can be compiled into a button, click this button to pop up the picture, use as follows:
<vImageViewer src="/image/demo.png" alt="this is a demo image" :inline="false"/>
inline
is set to true
, it will become an inline element, it is not required, default false
You may be interested in these plugins: Click me to view more vitepress plugins
FAQs
image viewer for vitepress
The npm package vitepress-plugin-image-viewer receives a total of 108 weekly downloads. As such, vitepress-plugin-image-viewer popularity was classified as not popular.
We found that vitepress-plugin-image-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.