Skip to content

Commit ece771e

Browse files
jamesarichCopilot
andauthored
docs: comprehensive accuracy audit and CI fix (#5489)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bbdc4a3 commit ece771e

28 files changed

Lines changed: 247 additions & 185 deletions

build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/DocsTasks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DocsTasks : Plugin<Project> {
6161
bundleDir.set(outputDir.map { it.dir("common") })
6262
schemaFile.set(
6363
project.rootProject.layout.projectDirectory
64-
.file("specs/003-app-docs-markdown/contracts/keyword-index-schema.json")
64+
.file("specs/20260507-161858-app-docs-markdown/contracts/keyword-index-schema.json")
6565
)
6666
}
6767

docs/_config.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -28,242 +28,242 @@ color_scheme: meshtastic
2828
# Default front-matter for pages in subdirectories
2929
defaults:
3030
- scope:
31-
path: "user"
31+
path: "user/"
3232
values:
3333
parent: User Guide
3434
layout: default
3535
- scope:
36-
path: "developer"
36+
path: "developer/"
3737
values:
3838
parent: Developer Guide
3939
layout: default
4040
# Locale-translated pages are excluded from main nav but still rendered.
4141
# They use a dedicated locale layout with a back-link to the English version.
4242
# Auto-generated from Android app locales (values-* resource dirs).
4343
- scope:
44-
path: "ar"
44+
path: "ar/"
4545
values:
4646
layout: locale_page
4747
locale: ar
4848
nav_exclude: true
4949
- scope:
50-
path: "be"
50+
path: "be/"
5151
values:
5252
layout: locale_page
5353
locale: be
5454
nav_exclude: true
5555
- scope:
56-
path: "bg"
56+
path: "bg/"
5757
values:
5858
layout: locale_page
5959
locale: bg
6060
nav_exclude: true
6161
- scope:
62-
path: "ca"
62+
path: "ca/"
6363
values:
6464
layout: locale_page
6565
locale: ca
6666
nav_exclude: true
6767
- scope:
68-
path: "cs"
68+
path: "cs/"
6969
values:
7070
layout: locale_page
7171
locale: cs
7272
nav_exclude: true
7373
- scope:
74-
path: "de"
74+
path: "de/"
7575
values:
7676
layout: locale_page
7777
locale: de
7878
nav_exclude: true
7979
- scope:
80-
path: "el"
80+
path: "el/"
8181
values:
8282
layout: locale_page
8383
locale: el
8484
nav_exclude: true
8585
- scope:
86-
path: "es"
86+
path: "es/"
8787
values:
8888
layout: locale_page
8989
locale: es
9090
nav_exclude: true
9191
- scope:
92-
path: "et"
92+
path: "et/"
9393
values:
9494
layout: locale_page
9595
locale: et
9696
nav_exclude: true
9797
- scope:
98-
path: "fi"
98+
path: "fi/"
9999
values:
100100
layout: locale_page
101101
locale: fi
102102
nav_exclude: true
103103
- scope:
104-
path: "fr"
104+
path: "fr/"
105105
values:
106106
layout: locale_page
107107
locale: fr
108108
nav_exclude: true
109109
- scope:
110-
path: "ga"
110+
path: "ga/"
111111
values:
112112
layout: locale_page
113113
locale: ga
114114
nav_exclude: true
115115
- scope:
116-
path: "gl"
116+
path: "gl/"
117117
values:
118118
layout: locale_page
119119
locale: gl
120120
nav_exclude: true
121121
- scope:
122-
path: "he"
122+
path: "he/"
123123
values:
124124
layout: locale_page
125125
locale: he
126126
nav_exclude: true
127127
- scope:
128-
path: "hr"
128+
path: "hr/"
129129
values:
130130
layout: locale_page
131131
locale: hr
132132
nav_exclude: true
133133
- scope:
134-
path: "ht"
134+
path: "ht/"
135135
values:
136136
layout: locale_page
137137
locale: ht
138138
nav_exclude: true
139139
- scope:
140-
path: "hu"
140+
path: "hu/"
141141
values:
142142
layout: locale_page
143143
locale: hu
144144
nav_exclude: true
145145
- scope:
146-
path: "is"
146+
path: "is/"
147147
values:
148148
layout: locale_page
149149
locale: is
150150
nav_exclude: true
151151
- scope:
152-
path: "it"
152+
path: "it/"
153153
values:
154154
layout: locale_page
155155
locale: it
156156
nav_exclude: true
157157
- scope:
158-
path: "ja"
158+
path: "ja/"
159159
values:
160160
layout: locale_page
161161
locale: ja
162162
nav_exclude: true
163163
- scope:
164-
path: "ko"
164+
path: "ko/"
165165
values:
166166
layout: locale_page
167167
locale: ko
168168
nav_exclude: true
169169
- scope:
170-
path: "lt"
170+
path: "lt/"
171171
values:
172172
layout: locale_page
173173
locale: lt
174174
nav_exclude: true
175175
- scope:
176-
path: "nl"
176+
path: "nl/"
177177
values:
178178
layout: locale_page
179179
locale: nl
180180
nav_exclude: true
181181
- scope:
182-
path: "no"
182+
path: "no/"
183183
values:
184184
layout: locale_page
185185
locale: no
186186
nav_exclude: true
187187
- scope:
188-
path: "pl"
188+
path: "pl/"
189189
values:
190190
layout: locale_page
191191
locale: pl
192192
nav_exclude: true
193193
- scope:
194-
path: "pt"
194+
path: "pt/"
195195
values:
196196
layout: locale_page
197197
locale: pt
198198
nav_exclude: true
199199
- scope:
200-
path: "pt-rBR"
200+
path: "pt-rBR/"
201201
values:
202202
layout: locale_page
203203
locale: pt-rBR
204204
nav_exclude: true
205205
- scope:
206-
path: "ro"
206+
path: "ro/"
207207
values:
208208
layout: locale_page
209209
locale: ro
210210
nav_exclude: true
211211
- scope:
212-
path: "ru"
212+
path: "ru/"
213213
values:
214214
layout: locale_page
215215
locale: ru
216216
nav_exclude: true
217217
- scope:
218-
path: "sk"
218+
path: "sk/"
219219
values:
220220
layout: locale_page
221221
locale: sk
222222
nav_exclude: true
223223
- scope:
224-
path: "sl"
224+
path: "sl/"
225225
values:
226226
layout: locale_page
227227
locale: sl
228228
nav_exclude: true
229229
- scope:
230-
path: "sq"
230+
path: "sq/"
231231
values:
232232
layout: locale_page
233233
locale: sq
234234
nav_exclude: true
235235
- scope:
236-
path: "sr"
236+
path: "sr/"
237237
values:
238238
layout: locale_page
239239
locale: sr
240240
nav_exclude: true
241241
- scope:
242-
path: "sv"
242+
path: "sv/"
243243
values:
244244
layout: locale_page
245245
locale: sv
246246
nav_exclude: true
247247
- scope:
248-
path: "tr"
248+
path: "tr/"
249249
values:
250250
layout: locale_page
251251
locale: tr
252252
nav_exclude: true
253253
- scope:
254-
path: "uk"
254+
path: "uk/"
255255
values:
256256
layout: locale_page
257257
locale: uk
258258
nav_exclude: true
259259
- scope:
260-
path: "zh-rCN"
260+
path: "zh-rCN/"
261261
values:
262262
layout: locale_page
263263
locale: zh-rCN
264264
nav_exclude: true
265265
- scope:
266-
path: "zh-rTW"
266+
path: "zh-rTW/"
267267
values:
268268
layout: locale_page
269269
locale: zh-rTW

docs/_includes/language_switcher.html

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,56 @@
1515
{% assign locales = site.data.locales %}
1616

1717
{% if locales and current_path %}
18+
{% assign path_parts = current_path | split: "/" %}
19+
{% assign first_segment = path_parts[0] %}
20+
21+
{% comment %} Build the list of available translations first {% endcomment %}
22+
{% assign has_translations = false %}
23+
24+
{% if locales[first_segment] %}
25+
{% comment %} We're on a translated page — English link is always available {% endcomment %}
26+
{% assign has_translations = true %}
27+
{% assign remaining_parts = path_parts | slice: 1, path_parts.size %}
28+
{% assign en_path = remaining_parts | join: "/" | replace: ".md", "" %}
29+
{% else %}
30+
{% comment %} Check if any translated version exists {% endcomment %}
31+
{% assign en_relative = current_path | replace: ".md", "" %}
32+
{% for locale in locales %}
33+
{% assign locale_code = locale[0] %}
34+
{% assign locale_file = locale_code | append: "/" | append: en_relative | append: ".md" %}
35+
{% for p in site.pages %}
36+
{% if p.path == locale_file %}
37+
{% assign has_translations = true %}
38+
{% break %}
39+
{% endif %}
40+
{% endfor %}
41+
{% if has_translations %}{% break %}{% endif %}
42+
{% endfor %}
43+
{% endif %}
44+
45+
{% if has_translations %}
1846
<details class="language-switcher" aria-label="Language options">
1947
<summary class="language-switcher-btn" title="View in another language">
2048
🌐 <span class="lang-current">English</span>
2149
</summary>
2250
<ul class="language-switcher-list">
23-
{% comment %} Always show English link back to source {% endcomment %}
24-
{% assign path_parts = current_path | split: "/" %}
25-
{% assign first_segment = path_parts[0] %}
26-
27-
{% comment %} Detect if we're currently IN a locale subdir {% endcomment %}
2851
{% if locales[first_segment] %}
29-
{% comment %} We're on a translated page — link back to English {% endcomment %}
30-
{% assign remaining_parts = path_parts | slice: 1, path_parts.size %}
31-
{% assign en_path = remaining_parts | join: "/" | replace: ".md", "" %}
3252
<li><a href="{{ en_path | relative_url }}" lang="en">English</a></li>
3353
{% endif %}
3454

35-
{% comment %} Show all available locale versions {% endcomment %}
3655
{% for locale in locales %}
3756
{% assign locale_code = locale[0] %}
3857
{% assign locale_info = locale[1] %}
3958

4059
{% if locales[first_segment] %}
41-
{% comment %} We're already on a translated page {% endcomment %}
4260
{% if locale_code == first_segment %}
4361
{% continue %}
4462
{% endif %}
4563
{% assign locale_path = locale_code | append: "/" | append: en_path %}
4664
{% else %}
47-
{% comment %} We're on an English page {% endcomment %}
48-
{% assign en_relative = current_path | replace: ".md", "" %}
4965
{% assign locale_path = locale_code | append: "/" | append: en_relative %}
5066
{% endif %}
5167

52-
{% comment %}
53-
Check if the translated file actually exists.
54-
Jekyll doesn't have a file_exists filter, so we check site.pages.
55-
{% endcomment %}
5668
{% assign locale_file = locale_path | append: ".md" %}
5769
{% assign page_exists = false %}
5870
{% for p in site.pages %}
@@ -69,3 +81,4 @@
6981
</ul>
7082
</details>
7183
{% endif %}
84+
{% endif %}

docs/assets/screenshots/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Then copy the relevant light-mode PNGs from the reference directory. The
3030
Examples:
3131
- `onboarding_welcome.png`
3232
- `connections_bluetooth_scan.png`
33-
- `messages-and-channels_channel_list.png`
3433
- `firmware_disclaimer.png`
3534

3635
## Guidelines
-75.5 KB
Binary file not shown.
-1.62 KB
Binary file not shown.
-12.4 KB
Binary file not shown.

docs/developer.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Developer Guide
33
layout: default
44
nav_order: 2
55
has_children: true
6-
parent: ""
76
---
87

98
# Developer Guide

0 commit comments

Comments
 (0)