Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor path joining in checker.ts #3005

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions .github/actions/validate-docs-links/src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,20 @@ async function getAllMdxFilePaths(basePath: string): Promise<RouteFragment[]> {
const footer: FooterConfigSchema = JSON.parse(await fs.readFile(path.join(basePath, 'config/sidebar-footer.json'), 'utf8'))

const config = [
...sidebarLearn.map(group => ({...group, slug: path.join('learn', group.slug)})),
...sidebarReference.map(group => ({...group, slug: path.join('reference/', group.slug)})),
...sidebarGuides.map(group => ({...group, slug: path.join('guides/', group.slug)}))
]

let allRoutes: RouteSchema[] = [{source: path.join(basePath, 'home.mdx'), slug: '', label: 'Homepage'}]
...sidebarLearn.map(group => ({ ...group, slug: path.posix.join('learn', group.slug) })),
...sidebarReference.map(group => ({ ...group, slug: path.posix.join('reference', group.slug) })),
...sidebarGuides.map(group => ({ ...group, slug: path.posix.join('guides', group.slug) })),
];
let allRoutes = [{ source: path.join(basePath, 'home.mdx'), slug: '', label: 'Homepage' }];
for (const group of config) {
allRoutes = allRoutes.concat(group.routes.map(route => ({
...route,
slug: path.join(group.slug, route.slug),
source: path.join(basePath, route.source)
})))
allRoutes = allRoutes.concat(
group.routes.map(route => ({
...route,
slug: path.posix.join(group.slug, route.slug),
source: path.join(basePath, route.source),
}))
);
}
footer.forEach(item => 'source' in item && allRoutes.push({...item, source: path.join(basePath, item.source)}))

Expand Down
93 changes: 53 additions & 40 deletions home.mdx
Original file line number Diff line number Diff line change
@@ -1,54 +1,67 @@
---
title: Meilisearch Documentation
description: Everything you need to use Meilisearch.
description: Everything you need to use Meilisearch.
---

# Documentation

Learn how to use Meilisearch in your projects by exploring our guides and API reference.

<Featured items={[
{
content: (
<Featured
items={[
{
content: (
<>
<Heading as="h2" style={{marginBottom: "-10px"}} noAnchor>Getting started with Meilisearch Cloud</Heading> New here? Check out our quick start guide to learn how to set up Meilisearch using our Cloud offering, import data, and make your first search.
<Heading as="h2" style={{ marginBottom: "-10px" }} noAnchor>
Getting started with Meilisearch Cloud
</Heading>{" "}
New here? Check out our quick start guide to learn how to set up
Meilisearch using our Cloud offering, import data, and make your first
search.
</>
),
size: 4,
link: '/docs/learn/getting_started/cloud_quick_start'
},
{
content: (
size: 4,
link: "/docs/learn/getting_started/cloud_quick_start",
},
{
content: (
<>
<Heading as="h2" style={{marginBottom: "-10px"}} noAnchor>Quick start</Heading> Prefer self-hosting? Take a look at our quick start guide and learn how to set up and use Meilisearch locally.
<Heading as="h2" style={{ marginBottom: "-10px" }} noAnchor>
Quick start
</Heading>{" "}
Prefer self-hosting? Take a look at our quick start guide and learn
how to set up and use Meilisearch locally.
</>
),
size: 4,
link: '/docs/learn/self_hosted/getting_started_with_self_hosted_meilisearch'
},
{
icon: 'custom',
content:'Consult the Meilisearch API reference.',
size: 1,
link: '/docs/reference/api/overview'
},
{
content: 'Looking for SDK documentation? Check out this list of official Meilisearch libraries.',
icon: 'cube',
size: 3,
link: '/docs/learn/resources/sdks'
},
{
content: 'Announcing Meilisearch Cloud: the best way to add Meilisearch to your project',
icon: 'cloud',
size: 2,
link: 'https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=docs&utm_medium=home-page'
},
{
content:
'For more tips, tutorials, and information about our company, take a look at the Meilisearch blog.',
icon: 'openSource',
size: 2,
link: 'https://blog.meilisearch.com'
}
]} />
size: 4,
link: "/docs/learn/self_hosted/getting_started_with_self_hosted_meilisearch",
},
{
icon: "custom",
content: "Consult the Meilisearch API reference.",
size: 1,
link: "/docs/reference/api/overview",
},
{
content:
"Looking for SDK documentation? Check out this list of official Meilisearch libraries.",
icon: "cube",
size: 3,
link: "/docs/learn/resources/sdks",
},
{
content:
"Announcing Meilisearch Cloud: the best way to add Meilisearch to your project",
icon: "cloud",
size: 2,
link: "https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=docs&utm_medium=home-page",
},
{
content:
"For more tips, tutorials, and information about our company, take a look at the Meilisearch blog.",
icon: "openSource",
size: 2,
link: "https://blog.meilisearch.com",
},
]}
/>