Skip to content

Commit b9850ca

Browse files
committed
misc: add JS list params to qn URL
1 parent 9e8c9ef commit b9850ca

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/gen.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import util from 'util';
77
import { QuestionFrontmatter, QuestionItem, QuestionMetadata } from './types';
88
import { GITHUB_ORG, GITHUB_REPO } from './constants';
99
import questionsAll from '../data/questions.json';
10+
import url from 'node:url';
1011

1112
const README_PATH_EN = 'README.md';
1213

@@ -52,7 +53,15 @@ async function processQuestion(
5253
return {
5354
locale,
5455
metadata,
55-
href: `https://greatfrontend.com/questions/quiz/${metadata.slug}`,
56+
href:
57+
'https://www.greatfrontend.com' +
58+
url.format({
59+
pathname: `/questions/quiz/${metadata.slug}`,
60+
query: {
61+
language: 'js',
62+
tab: 'quiz',
63+
},
64+
}),
5665
title,
5766
titleSlug: slug(title),
5867
content: tlDrPart

0 commit comments

Comments
 (0)