Skip to content

Commit 5e61319

Browse files
Move consolidated to /public/consolidated Also updates CODEOWNERS to reflect change in folder structure.
1 parent b00ddc2 commit 5e61319

15 files changed

+6
-6
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/src/ @psychlone77 @saminjay
88

99
# Snippets maintainers
10-
/public/data @Mathys-Gasnier
10+
/snippets @Mathys-Gasnier
1111

1212

1313
# ---------- What is a maintainer ----------

.github/workflows/consolidate-snippets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
run: |
3434
git config --global user.name "GitHub Action"
3535
git config --global user.email "[email protected]"
36-
git add public/data/*
36+
git add public/consolidated/*
3737
git commit -m "Update consolidated snippets"
3838
git push
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/hooks/useCategories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type CategoryData = {
1212
export const useCategories = () => {
1313
const { language } = useAppContext();
1414
const { data, loading, error } = useFetch<CategoryData[]>(
15-
`/data/${slugify(language.lang)}.json`
15+
`/consolidated/${slugify(language.lang)}.json`
1616
);
1717

1818
const fetchedCategories = useMemo(() => {

src/hooks/useLanguages.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useFetch } from "./useFetch";
33

44
export const useLanguages = () => {
55
const { data, loading, error } =
6-
useFetch<LanguageType[]>("/data/_index.json");
6+
useFetch<LanguageType[]>("/consolidated/_index.json");
77

88
return { fetchedLanguages: data || [], loading, error };
99
};

src/hooks/useSnippets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type CategoryData = {
1111
export const useSnippets = () => {
1212
const { language, category } = useAppContext();
1313
const { data, loading, error } = useFetch<CategoryData[]>(
14-
`/data/${slugify(language.lang)}.json`
14+
`/consolidated/${slugify(language.lang)}.json`
1515
);
1616

1717
const fetchedSnippets = data

utils/consolidateSnippets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { parseAllSnippets, reverseSlugify } from './snippetParser.js';
33
import { join } from 'path';
44
import { copyFileSync, writeFileSync } from 'fs';
55

6-
const dataPath = 'public/data/';
6+
const dataPath = 'public/consolidated/';
77
const indexPath = join(dataPath, '_index.json');
88
const iconPath = 'public/icons/';
99
const snippetsPath = 'snippets/';

0 commit comments

Comments
 (0)