add import linting + fix checks
This commit is contained in:
parent
ea2d8b2773
commit
902f722d4c
17 changed files with 317 additions and 173 deletions
|
|
@ -47,7 +47,8 @@
|
|||
"rehype-autolink-headings": "^6.1.1",
|
||||
"rehype-slug": "^5.0.1",
|
||||
"remark-toc": "^8.0.1",
|
||||
"tailwindcss": "^3.2.4"
|
||||
"tailwindcss": "^3.2.4",
|
||||
"canvas": "^2.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"html-escaper": "^3.0.3"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export const ALGOLIA = {
|
|||
apiKey: 'XXXXXXXXXX',
|
||||
};
|
||||
|
||||
export type Sidebar = Record<typeof KNOWN_LANGUAGE_CODES[number], Record<string, { text: string; link: string }[]>>;
|
||||
export type Sidebar = Record<(typeof KNOWN_LANGUAGE_CODES)[number], Record<string, { text: string; link: string }[]>>;
|
||||
export const SIDEBAR: Sidebar = {
|
||||
en: {
|
||||
Tutorial: [
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ export const langPathRegex = /\/([a-z]{2}-?[A-Z]{0,2})\//;
|
|||
export function getLanguageFromURL(pathname: string) {
|
||||
const langCodeMatch = pathname.match(langPathRegex);
|
||||
const langCode = langCodeMatch ? langCodeMatch[1] : 'en';
|
||||
return langCode as typeof KNOWN_LANGUAGE_CODES[number];
|
||||
return langCode as (typeof KNOWN_LANGUAGE_CODES)[number];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue