diff --git a/sites/dev/pages/about.mjs b/sites/dev/pages/about.mjs index 0f7ce0778c5..6574a4edd1b 100644 --- a/sites/dev/pages/about.mjs +++ b/sites/dev/pages/about.mjs @@ -15,7 +15,7 @@ import { BaseLayoutRight, } from 'shared/components/base-layout.mjs' -const ContactPage = ({ page, slug }) => { +const ContactPage = ({ page }) => { const title = 'About FreeSewing' return ( @@ -180,7 +180,6 @@ export async function getStaticProps() { return { props: { ...(await serverSideTranslations('en')), - slug: 'about', page: { path: ['about'], }, diff --git a/sites/dev/pages/search.mjs b/sites/dev/pages/search.mjs index c08869edad8..4448a4baaff 100644 --- a/sites/dev/pages/search.mjs +++ b/sites/dev/pages/search.mjs @@ -15,7 +15,7 @@ import { const namespaces = [...pageNs] -const SearchPage = ({ page, slug }) => { +const SearchPage = ({ page }) => { const title = 'Search' const tip = ( @@ -51,7 +51,6 @@ export async function getStaticProps() { return { props: { ...(await serverSideTranslations('en', namespaces)), - slug: 'search', page: { path: ['search'], }, diff --git a/sites/shared/components/mdx/read-more.mjs b/sites/shared/components/mdx/read-more.mjs index d3f04f66254..3b94a0bf108 100644 --- a/sites/shared/components/mdx/read-more.mjs +++ b/sites/shared/components/mdx/read-more.mjs @@ -69,13 +69,7 @@ const RenderTree = ({ tree, recurse, depth = 1, level = 0 }) => { ) } -export const ReadMore = ({ - recurse = 0, - root = false, - site = 'org', - depth = 99, - ignoreControl, -}) => { +export const ReadMore = ({ recurse = 0, root = false, site = 'org', depth = 99 }) => { const { siteNav, slug } = useContext(NavigationContext) // Deal with recurse not being a number diff --git a/sites/shared/components/sets/set.mjs b/sites/shared/components/sets/set.mjs index b83f0e12882..cf72fd69116 100644 --- a/sites/shared/components/sets/set.mjs +++ b/sites/shared/components/sets/set.mjs @@ -6,7 +6,7 @@ export const ns = ['designs', 'tags'] -export const Set = ({ name }) => { +export const Set = ({}) => { //const { t } = useTranslation(ns) return

fixme

diff --git a/sites/shared/context/navigation-context.mjs b/sites/shared/context/navigation-context.mjs index 04599d61221..68180b78e78 100644 --- a/sites/shared/context/navigation-context.mjs +++ b/sites/shared/context/navigation-context.mjs @@ -35,7 +35,7 @@ export const NavigationContextProvider = ({ children }) => { * @param value {value} to set */ function updateSiteNav(path, value) { - setSiteNav(objUpdate(__siteNav.siteNav, path, value)) + setSiteNav(objUpdate(siteNav[locale], path, value)) } /* @@ -49,7 +49,7 @@ export const NavigationContextProvider = ({ children }) => { * We'll do this later. Not even certain it's needed as we may just not place * previous/next links on user-generated content. */ - function updateSlugLut(path, value) { + function updateSlugLut() { // FIXME: Is this even needed? console.log('updateSlugLut is not implemented (yet)') } @@ -70,7 +70,7 @@ export const NavigationContextProvider = ({ children }) => { * so that updating it will trigger a re-render and the propagated value will update. */ const [siteNav, setSiteNav] = useState(defaultSiteNav) - const [slugLut, setSlugLut] = useState(defaultSlugLut) + const [slugLut] = useState(defaultSlugLut) /* * Pass everything down as the value object, including the methods to update diff --git a/sites/shared/prebuild/git.mjs b/sites/shared/prebuild/git.mjs index 00866ab94a1..e68bb659803 100644 --- a/sites/shared/prebuild/git.mjs +++ b/sites/shared/prebuild/git.mjs @@ -84,7 +84,7 @@ const getMdxFileList = async (cwd) => { const cmd = `find ${cwd} -type f -name "en.md"` const find = exec(cmd, { cwd }, (error, stdout, stderr) => { if (error) { - console.error(`exec error: ${error}`) + console.error(`exec error: ${error} - ${stderr}`) return } diff --git a/sites/shared/prebuild/markdown.mjs b/sites/shared/prebuild/markdown.mjs index 0c11f834e77..52d41b78cf8 100644 --- a/sites/shared/prebuild/markdown.mjs +++ b/sites/shared/prebuild/markdown.mjs @@ -32,7 +32,6 @@ const loadFolderFrontmatter = async (key, site, folder, transform = false, lang * Figure out what directory to spawn the child process in */ const cwd = await path.resolve(process.cwd(), '..', '..', 'markdown', site, folder) - let list = false /* * When going through a small number of files in a flat directory (eg. blog posts) a * recursive grep through all files is faster. @@ -44,7 +43,7 @@ const loadFolderFrontmatter = async (key, site, folder, transform = false, lang }.md" -exec grep "^${key}:" -ism 1 {} +` const grep = exec(cmd, { cwd }, (error, stdout, stderr) => { if (error) { - console.error(`exec error: ${error}`) + console.error(`exec error: ${error} - ${stderr}`) return } diff --git a/sites/shared/prebuild/sitenav-dev.mjs b/sites/shared/prebuild/sitenav-dev.mjs index 76aa4c0c82c..3ed1cfe639b 100644 --- a/sites/shared/prebuild/sitenav-dev.mjs +++ b/sites/shared/prebuild/sitenav-dev.mjs @@ -11,7 +11,7 @@ * Note: Set 'n' to mark this as a noisy entry that should always be closed unless active (like blog) */ -export const extendSiteNav = (pages, lang) => { +export const extendSiteNav = (pages) => { pages.about = { s: 'about', t: 'About FreeSewing',