mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Translate category sluf to kind names
This commit is contained in:
parent
7f9d335f19
commit
387daeb3d2
1 changed files with 7 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ import { buildVideoPayload, buildAppBenchmarkPayload } from '~/helpers/build-pay
|
||||||
|
|
||||||
import {
|
import {
|
||||||
categories,
|
categories,
|
||||||
makeSummaryOfListings
|
getCategoryKindName
|
||||||
} from '~/helpers/categories.js'
|
} from '~/helpers/categories.js'
|
||||||
import {
|
import {
|
||||||
getAppType,
|
getAppType,
|
||||||
|
|
@ -412,10 +412,13 @@ class BuildLists {
|
||||||
|
|
||||||
// Store sample names into kindIndex as description
|
// Store sample names into kindIndex as description
|
||||||
for ( const categorySlug in kindIndex ) {
|
for ( const categorySlug in kindIndex ) {
|
||||||
kindIndex[categorySlug].description = kindLists[categorySlug].summary.sampleNames
|
const kindName = getCategoryKindName( categorySlug )
|
||||||
}
|
|
||||||
|
|
||||||
console.log( 'kindIndex', kindIndex )
|
// Skip empty categories
|
||||||
|
if ( kindLists[ kindName ].list.length === 0 ) continue
|
||||||
|
|
||||||
|
kindIndex[ categorySlug ].description = kindLists[ kindName ].summary.sampleNames
|
||||||
|
}
|
||||||
|
|
||||||
// Save the index
|
// Save the index
|
||||||
await this.saveToJson( kindIndex, `${ apiDirectory }/kind/index.json` )
|
await this.saveToJson( kindIndex, `${ apiDirectory }/kind/index.json` )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue