lint fixes
This commit is contained in:
parent
6bd7136fab
commit
36b28a8f93
7 changed files with 9 additions and 16 deletions
|
@ -20,7 +20,7 @@ import { PrevNext } from 'shared/components/prev-next.mjs'
|
|||
|
||||
export const ns = [navNs, 'docs'] //navNs
|
||||
|
||||
export const FrontmatterHead = ({ frontmatter }) => (
|
||||
export const FrontmatterHead = ({ frontmatter, slug, locale }) => (
|
||||
<Head>
|
||||
<meta property="og:title" content={frontmatter.title} key="title" />
|
||||
<meta property="og:type" content="article" key="type" />
|
||||
|
@ -50,6 +50,7 @@ export const DocsLayout = ({ children = [], slug, frontmatter, locale }) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<FrontmatterHead {...{ frontmatter, slug, locale }} />
|
||||
<BaseLayout>
|
||||
<BaseLayoutLeft>
|
||||
<MainSections {...{ siteNav, slug }} />
|
||||
|
|
|
@ -21,11 +21,12 @@ export const ns = [navNs, 'docs'] //navNs
|
|||
|
||||
const isEndSlug = (slug) => slug.split('/').length === 1
|
||||
|
||||
export const PostLayout = ({ children = [], slug, frontmatter }) => {
|
||||
export const PostLayout = ({ children = [], slug, frontmatter, locale }) => {
|
||||
const { siteNav } = useNavigation({ ignoreControl: true })
|
||||
|
||||
return (
|
||||
<>
|
||||
<FrontmatterHead {...{ frontmatter, slug, locale }} />
|
||||
<BaseLayout>
|
||||
<BaseLayoutLeft>
|
||||
<MainSections {...{ siteNav, slug }} />
|
||||
|
|
|
@ -8,7 +8,7 @@ import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
|||
|
||||
export const ns = ['common', 'posts']
|
||||
|
||||
export const PostArticle = ({ slug, frontmatter, MDX, page }) => {
|
||||
export const PostArticle = ({ frontmatter, MDX }) => {
|
||||
const { t } = useTranslation('common')
|
||||
return (
|
||||
<article className="mb-12 px-8 max-w-7xl">
|
||||
|
|
|
@ -7,7 +7,7 @@ export const getPostSlugPaths = (order) => {
|
|||
|
||||
for (const lang in order) {
|
||||
for (let i = 0; i < preGenerate; i++) {
|
||||
const slug = order[lang][i]
|
||||
ß
|
||||
paths.push(localePath(lang, `${order[lang][i]}`))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,12 +3,10 @@ import { mdxPaths } from 'site/prebuild/mdx-paths.en.mjs'
|
|||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
// Hooks
|
||||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { useDynamicMdx } from 'shared/hooks/use-dynamic-mdx.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Loading } from 'shared/components/spinner.mjs'
|
||||
import { components } from 'shared/components/mdx/index.mjs'
|
||||
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
||||
import { DocsLayout, ns as layoutNs } from 'site/components/layouts/docs.mjs'
|
||||
import { loaders } from 'shared/components/dynamic-docs/org.mjs'
|
||||
|
@ -36,7 +34,7 @@ const ns = [...pageNs, layoutNs]
|
|||
* joost
|
||||
*
|
||||
*/
|
||||
export const Page = ({ page, locale, frontmatter, MDX, slug }) => (
|
||||
export const Page = ({ page, locale, frontmatter, MDX }) => (
|
||||
<PageWrapper
|
||||
{...page}
|
||||
locale={locale}
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
// Hooks
|
||||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { useDynamicMdx } from 'shared/hooks/use-dynamic-mdx.mjs'
|
||||
// Components
|
||||
import { ns } from 'shared/components/wrappers/page.mjs'
|
||||
import { components } from 'shared/components/mdx/index.mjs'
|
||||
//import { TocWrapper } from 'shared/components/wrappers/toc.mjs'
|
||||
import { Page } from './[...slug].mjs'
|
||||
|
||||
const DocsHomePage = ({ page, slug, locale }) => {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { loadMdxForPrebuild, header } from './docs.mjs'
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import rdir from 'recursive-readdir'
|
||||
import orderBy from 'lodash.orderby'
|
||||
|
||||
const types = ['blog', 'showcase', 'newsletter']
|
||||
|
||||
|
@ -20,8 +18,6 @@ export const prebuildPosts = async (site) => {
|
|||
const writeOps = []
|
||||
const pages = {}
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
const writePath = path.resolve('..', site, 'prebuild', types[i])
|
||||
|
||||
const sorted = {}
|
||||
const resultPages = results[i]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue