@lg2/nuxt3-plugin-link-resolver
link resolver plugin fro nuxt3
3,544
| Install | |
|---|---|
npm install @lg2/nuxt3-plugin-link-resolver |
|
| Latest Version: | 0.0.134 |
| License: | ISC |
| Last Updated: | Jun 11, 2024 |
| Links: | GitHub · npm |
Maintainer: romainavalle-lg2
nuxt3-plugin-link-resolver
create a linkResolverbase on your ~/assets/jsons/link-resolver.json
yarn add @lg2/nuxt3-plugin-link-resolver -D
npm i @lg2/nuxt3-plugin-link-resolver -D
const { $lr } = useNuxtApp();
$lr({__typename:'BlogArticleRecord',slug:slug})
How to use
~/plugins/link-resolver.js
import linkResolver from '@lg2/nuxt3-plugin-link-resolver'
import { defineNuxtPlugin } from "#app";
export default defineNuxtPlugin(() => {
return {
provide: {
lr: linkResolver,
},
};
});
example of link-resolver.json
{
"AboutRecord": { "name": "a-propos" },
"BlogIndexRecord": { "name": "blogue" },
"BlogArticleRecord": {
"name": "blogue-slug",
"params": { "slug": "slug"}
},
"MultiparamsRecord": {
"name": "route-category-slug",
"params": { "slug": "slug", "category": "category.slug" }
},
}
Related Packages
@piwikpro/nuxt-piwik-pro
Dedicated Piwik PRO library that helps with implementing Piwik PRO Tag Manager a...
9,831
Version History
| Version | Released | License |
|---|---|---|
| 0.0.134 | ISC | |
| 0.0.133 | ISC | |
| 0.0.132 | ISC | |
| 0.0.131 | ISC | |
| 0.0.111 | ISC | |
| 0.0.13 | ISC | |
| 0.0.12 | ISC | |
| 0.0.11 | ISC | |
| 0.0.1 | ISC |