From edc4ed2679a94efa6577bbbc958066c2c9c53568 Mon Sep 17 00:00:00 2001 From: Oleg Shchavelev Date: Thu, 25 Apr 2024 17:25:47 +0300 Subject: [PATCH] docs: update image frontmatter qbittorrent --- .../theme/components/AKWDocsAsideMeta.vue | 8 ++++--- package-lock.json | 23 +++++++++++++++++++ package.json | 3 ++- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.vitepress/theme/components/AKWDocsAsideMeta.vue b/.vitepress/theme/components/AKWDocsAsideMeta.vue index efa3826..3778d05 100644 --- a/.vitepress/theme/components/AKWDocsAsideMeta.vue +++ b/.vitepress/theme/components/AKWDocsAsideMeta.vue @@ -3,12 +3,11 @@ import { type Ref, computed } from 'vue' import VPImage from 'vitepress/dist/client/theme-default/components/VPImage.vue'; import { withBase, useData } from 'vitepress' import { getLists, getLinks, getLicence } from '../composables/asidemeta' +import { fileURLToPath, URL } from 'node:url' import AKWAsideMetaList from './AKWAsideMetaList.vue' import AKWAsideMetaLink from './AKWAsideMetaLink.vue' -import thumb from '../../../docs/apps/qbittorrent/img/org.qbittorrent.qBittorrent.png' - const { frontmatter, theme } = useData() const props = computed(() => { @@ -21,9 +20,12 @@ const props = computed(() => { const links = frontmatter.value.aggregation const config = theme.value.asideMeta const license = getLicence(metadata_license) + const aliasThumb = 'org.qbittorrent.qBittorrent.png' + const imgUrl = new URL(`./img/${aliasThumb}.png`, import.meta.url).href + console.log(import.meta.url); return { - thumb: thumb, + thumb: imgUrl, name: name, title: summary, developer: developer, diff --git a/package-lock.json b/package-lock.json index b7d9a9d..638b9c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "devDependencies": { "@nolebase/vitepress-plugin-enhanced-readabilities": "^1.22.4", "markdown-it-kbd": "^2.2.2", + "node": "^22.0.0", "vitepress": "^1.0.0-rc.25", "vitepress-plugin-tabs": "^0.5.0" } @@ -1398,6 +1399,28 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/node/-/node-22.0.0.tgz", + "integrity": "sha512-erpiz5vVgqdPOUo/1+xQLlSeqf95EgVVHkQ/b1eHq1VGEJYJSjgitYoYWtH85U1qF9polkt8TdrNEjtAQ38jEw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-bin-setup": "^1.0.0" + }, + "bin": { + "node": "bin/node" + }, + "engines": { + "npm": ">=5.0.0" + } + }, + "node_modules/node-bin-setup": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz", + "integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==", + "dev": true + }, "node_modules/perfect-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", diff --git a/package.json b/package.json index 53a4ea0..7c11d52 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "@nolebase/vitepress-plugin-enhanced-readabilities": "^1.22.4", "markdown-it-kbd": "^2.2.2", "vitepress": "^1.0.0-rc.25", - "vitepress-plugin-tabs": "^0.5.0" + "vitepress-plugin-tabs": "^0.5.0", + "node": "^22.0.0" }, "scripts": { "docs:dev": "vitepress dev",