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.
@ulu/unplugin-vue-router-frontmatter
Advanced tools
Pull frontmatter from pages that are markdown and add to route.meta. Use in extendRoute() method of unplugin-vue-router.
Pull frontmatter from pages that are markdown and add to route.meta. Use in extendRoute() method of unplugin-vue-router.
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueRouter from "unplugin-vue-router/vite";
import markdown from 'unplugin-vue-markdown/vite';
import addFrontmatter from "@ulu/unplugin-vue-router-frontmatter";
export default defineConfig({
plugins: [
markdown(),
vueRouter({
extensions: [".vue", ".md"],
extendRoute(route) {
addFrontmatter(route);
}
}),
vue({
include: [/\.vue$/, /\.md$/]
}),
],
});
You can also optionally pass a callback to modify the frontmatter that's added
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueRouter from "unplugin-vue-router/vite";
import markdown from 'unplugin-vue-markdown/vite';
import addFrontmatter from "@ulu/unplugin-vue-router-frontmatter";
export default defineConfig({
plugins: [
markdown(),
vueRouter({
extensions: [".vue", ".md"],
extendRoute(route) {
addFrontmatter(route, ({
title,
category,
order
}) => {
return { title, category, order };
});
}
}),
vue({
include: [/\.vue$/, /\.md$/]
}),
],
});
Used with vite-ssg, unplugin-vue-markdown (frontmatter) and adding it to unplugin-vue-router (route.meta) so that things like menus can be built dynamically (toolkits, guides, etc). And to avoid having to do any of this on the client side. For example grabbing each pages (title, order/weight) and adding it to the route meta in order to base menus on route structure.
FAQs
Pull frontmatter from pages that are markdown and add to route.meta. Use in extendRoute() method of unplugin-vue-router.
The npm package @ulu/unplugin-vue-router-frontmatter receives a total of 4 weekly downloads. As such, @ulu/unplugin-vue-router-frontmatter popularity was classified as not popular.
We found that @ulu/unplugin-vue-router-frontmatter demonstrated a healthy version release cadence and project activity because the last version was released less than 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.