@ampernic/vitepress-theme-alt-docs 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,11 +99,17 @@ const exports = computed((): ExportItem[] => {
99
99
 
100
100
  const items: ExportItem[] = []
101
101
 
102
+ // Manifest values may be bare filenames (served from the site) or absolute
103
+ // URLs (bundles hosted off-tree, e.g. a package registry) — use as-is then.
104
+ const isAbs = (v: string) => /^https?:\/\//.test(v)
105
+ const toUrl = (v: string) => (isAbs(v) ? v : `${resolvedBase.value}/${v}`)
106
+ const toName = (v: string) => (isAbs(v) ? v.split('/').pop() || v : v)
107
+
102
108
  if (vEntry.pdf) {
103
109
  items.push({
104
110
  format: 'pdf',
105
- url: `${resolvedBase.value}/${vEntry.pdf}`,
106
- filename: vEntry.pdf,
111
+ url: toUrl(vEntry.pdf),
112
+ filename: toName(vEntry.pdf),
107
113
  label: 'PDF',
108
114
  title: `Скачать версию ${currentVersion.value} в формате PDF`,
109
115
  icon: '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="12" y1="18" x2="12" y2="12"/><line x1="9" y1="15" x2="15" y2="15"/></svg>',
package/dist/index.mjs CHANGED
@@ -29,7 +29,8 @@ export const Theme = {
29
29
  "nav-bar-content-after": () => h(NolebaseEnhancedReadabilitiesMenu),
30
30
  "nav-screen-content-after": () => h(NolebaseEnhancedReadabilitiesScreenMenu),
31
31
  "sidebar-nav-before": () => h(ADProductsSidebar),
32
- "aside-outline-after": () => h(ExportButton)
32
+ // Above the outline ("Оглавление"), per request.
33
+ "aside-outline-before": () => h(ExportButton)
33
34
  }),
34
35
  enhanceApp({ app, router, siteData }) {
35
36
  installCrossSiteRouter(router, siteData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampernic/vitepress-theme-alt-docs",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Shared VitePress theme for ALT Linux documentation",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Ampernic",
@@ -27,17 +27,17 @@
27
27
  "peerDependencies": {
28
28
  "vitepress": "^1.0.0",
29
29
  "vue": "^3.0.0",
30
- "@ampernic/vitepress-plugin-export": "^0.1.35"
30
+ "@ampernic/vitepress-plugin-export": "^0.1.38"
31
31
  },
32
32
  "dependencies": {
33
33
  "@alt-gnome/markdown-it-custom-containers": "^1.0.0",
34
34
  "@nolebase/vitepress-plugin-enhanced-readabilities": "^2.14.0",
35
35
  "markdown-it-kbd": "^1.0.0",
36
36
  "vitepress-plugin-tabs": "^0.6.0",
37
- "@ampernic/vitepress-plugin-html-image": "0.1.2",
37
+ "@ampernic/vitepress-plugin-alt-docs-versioning": "0.1.9",
38
38
  "@ampernic/vitepress-plugin-cross-site-router": "0.1.2",
39
- "@ampernic/vitepress-plugin-alt-docs-versioning": "0.1.6",
40
- "@ampernic/vitepress-plugin-pagefind": "0.1.8"
39
+ "@ampernic/vitepress-plugin-pagefind": "0.1.8",
40
+ "@ampernic/vitepress-plugin-html-image": "0.1.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "builtin-modules": "^3.3.0",