@docsector/docsector-reader 2.0.3 → 2.0.4
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.
- package/README.md +1 -0
- package/bin/docsector.js +1 -1
- package/package.json +1 -1
- package/src/components/DPageMeta.vue +13 -11
package/README.md
CHANGED
|
@@ -59,6 +59,7 @@ Transform Markdown content into beautiful, navigable documentation sites — wit
|
|
|
59
59
|
- 🧭 **Robust Edit Link Mapping** — Normalizes route paths (including trailing slashes) into `page.subpage.locale.md` source files for reliable GitHub edit URLs
|
|
60
60
|
- 📅 **Last Updated Date** — Automatic per-page "last updated" date from git commit history, locale-formatted
|
|
61
61
|
- 📊 **Translation Progress** — Automatic translation percentage based on header coverage
|
|
62
|
+
- 🌐 **Accurate Available Translations** — Locale availability counter now uses actual localized page source presence, avoiding false negatives when metadata is equal
|
|
62
63
|
- 🧠 **Markdown Negotiation** — Responds with Markdown when clients send `Accept: text/markdown`, while keeping HTML as browser default
|
|
63
64
|
- 🔐 **Web Bot Auth** — Can publish a signed HTTP message signatures directory and includes helpers to sign outbound bot requests
|
|
64
65
|
- 🧭 **Content Signals** — Injects `Content-Signal` policy in `robots.txt` with deterministic, idempotent build output
|
package/bin/docsector.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docsector/docsector-reader",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
|
|
5
5
|
"productName": "Docsector Reader",
|
|
6
6
|
"author": "Rodrigo de Araujo Vieira",
|
|
@@ -107,23 +107,25 @@ const progress = computed(() => {
|
|
|
107
107
|
|
|
108
108
|
const languages = computed(() => {
|
|
109
109
|
const i18nPathAbsolute = store.state.i18n.absolute
|
|
110
|
-
const translations = pageValueI18nPath(i18nPathAbsolute, '_translations')
|
|
111
110
|
const i18nLocales = availableLocales
|
|
112
|
-
|
|
111
|
+
const sourcePath = pageValueI18nPath(i18nPathAbsolute, 'source')
|
|
113
112
|
|
|
114
|
-
if (
|
|
115
|
-
|
|
113
|
+
if (!i18nPathAbsolute || i18nLocales.length === 0) {
|
|
114
|
+
return `0/${i18nLocales.length}`
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
let i18nLocalesAvailable = 0
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
for (let i = 0; i < i18nLocales.length; i++) {
|
|
119
|
+
const currentLocale = i18nLocales[i]
|
|
120
|
+
|
|
121
|
+
if (!te(sourcePath, currentLocale)) {
|
|
122
|
+
continue
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const source = tm(sourcePath, currentLocale)
|
|
126
|
+
if (typeof source === 'string' && source.trim().length > 0) {
|
|
127
|
+
i18nLocalesAvailable++
|
|
124
128
|
}
|
|
125
|
-
} else {
|
|
126
|
-
i18nLocalesAvailable = 1
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
return `${i18nLocalesAvailable}/${i18nLocales.length}`
|