fix: deterministic family ordering (current first, legacy last)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Viktor Barzin 2026-05-07 23:25:13 +00:00
parent eade6e2542
commit 129410793a

View file

@ -94,14 +94,10 @@ cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /act</code></pre>
Click any key to copy. Click any key to copy.
</p> </p>
{{ $byFamily := dict }} {{ $order := slice "Windows 11 / 10" "Windows LTSC" "Legacy desktop" }}
{{ range $windows }} {{ range $family := $order }}
{{ $f := .family }} {{ $items := where $windows "family" $family }}
{{ $arr := index $byFamily $f | default slice }} {{ if $items }}
{{ $arr = $arr | append . }}
{{ $byFamily = merge $byFamily (dict $f $arr) }}
{{ end }}
{{ range $family, $items := $byFamily }}
<h3 class="family-head">{{ $family }}</h3> <h3 class="family-head">{{ $family }}</h3>
<table class="key-table"> <table class="key-table">
<thead><tr><th>Edition</th><th>GVLK</th><th class="notes-col">Notes</th></tr></thead> <thead><tr><th>Edition</th><th>GVLK</th><th class="notes-col">Notes</th></tr></thead>
@ -115,6 +111,7 @@ cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /act</code></pre>
{{ end }} {{ end }}
</tbody> </tbody>
</table> </table>
{{ end }}
{{ end }} {{ end }}
<details class="card"> <details class="card">
@ -132,14 +129,10 @@ slmgr /dlv :: verify (look for &quot;LICENSED&quot;)<
<h2>Windows Server</h2> <h2>Windows Server</h2>
<p class="muted">Server SKUs need only 5 unique clients to satisfy the KMS activation count threshold (vs. 25 for desktop).</p> <p class="muted">Server SKUs need only 5 unique clients to satisfy the KMS activation count threshold (vs. 25 for desktop).</p>
{{ $byFamily := dict }} {{ $serverOrder := slice "Windows Server 2025" "Windows Server 2022" "Windows Server 2019" "Windows Server 2016" "Windows Server 2012 R2" "Windows Server 2012" "Windows Server 2008 R2" "Windows Server 2008" }}
{{ range $servers }} {{ range $family := $serverOrder }}
{{ $f := .family }} {{ $items := where $servers "family" $family }}
{{ $arr := index $byFamily $f | default slice }} {{ if $items }}
{{ $arr = $arr | append . }}
{{ $byFamily = merge $byFamily (dict $f $arr) }}
{{ end }}
{{ range $family, $items := $byFamily }}
<h3 class="family-head">{{ $family }}</h3> <h3 class="family-head">{{ $family }}</h3>
<table class="key-table"> <table class="key-table">
<thead><tr><th>Edition</th><th>GVLK</th><th class="notes-col">Notes</th></tr></thead> <thead><tr><th>Edition</th><th>GVLK</th><th class="notes-col">Notes</th></tr></thead>
@ -153,6 +146,7 @@ slmgr /dlv :: verify (look for &quot;LICENSED&quot;)<
{{ end }} {{ end }}
</tbody> </tbody>
</table> </table>
{{ end }}
{{ end }} {{ end }}
</section> </section>
@ -165,14 +159,10 @@ slmgr /dlv :: verify (look for &quot;LICENSED&quot;)<
<code>ospp.vbs /unpkey:&lt;LAST5&gt;</code> + <code>/inpkey:&lt;GVLK&gt;</code> and <code>/act</code>. <code>ospp.vbs /unpkey:&lt;LAST5&gt;</code> + <code>/inpkey:&lt;GVLK&gt;</code> and <code>/act</code>.
</p> </p>
{{ $byFamily := dict }} {{ $officeOrder := slice "Office LTSC 2024" "Office LTSC 2021" "Office 2019" "Office 2016" }}
{{ range $office }} {{ range $family := $officeOrder }}
{{ $f := .family }} {{ $items := where $office "family" $family }}
{{ $arr := index $byFamily $f | default slice }} {{ if $items }}
{{ $arr = $arr | append . }}
{{ $byFamily = merge $byFamily (dict $f $arr) }}
{{ end }}
{{ range $family, $items := $byFamily }}
<h3 class="family-head">{{ $family }}</h3> <h3 class="family-head">{{ $family }}</h3>
<table class="key-table"> <table class="key-table">
<thead><tr><th>Edition</th><th>Product ID</th><th>GVLK</th><th class="notes-col">Channel</th></tr></thead> <thead><tr><th>Edition</th><th>Product ID</th><th>GVLK</th><th class="notes-col">Channel</th></tr></thead>
@ -187,6 +177,7 @@ slmgr /dlv :: verify (look for &quot;LICENSED&quot;)<
{{ end }} {{ end }}
</tbody> </tbody>
</table> </table>
{{ end }}
{{ end }} {{ end }}
<details class="card"> <details class="card">