Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Strip out docs and modules, redirect to docs.seqera.io #107

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
14 changes: 0 additions & 14 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,6 @@ export default defineConfig({
),
},
],
// Rewrite the image paths to be absolute for rehypeInline plugin
[
urls,
(url) => {
if (url.href.startsWith("../../images/")) {
return url.href.replace("../../images/", "../MultiQC/docs/images/");
} else {
var match = url.href.match(/\.\.\/.+\.md/);
if (match && match.length > 0) {
return url.href.replace(/\.\.\/(.+)\.md/, "/docs/$1");
}
}
},
],
[
rehypePrettyCode,
{
Expand Down
13 changes: 12 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
status = 301
force = true

[[redirects]]
from = "/docs/*"
to = "https://docs.seqera.io/multiqc/:splat"
status = 301
force = true

[[redirects]]
from = "/modules/*"
to = "https://docs.seqera.io/multiqc/modules/:splat"
status = 301
force = true

[[headers]]
for = "/_astro/*"
[headers.values]
Expand All @@ -28,7 +40,6 @@
status = 301
force = true


[[plugins]]
package = "@algolia/netlify-plugin-crawler"
[plugins.inputs]
Expand Down
17 changes: 3 additions & 14 deletions src/components/navbar/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
import NavbarMenu from "@components/navbar/NavbarMenu.astro";
import NavbarMenuMobile from "@components/navbar/NavbarMenuMobile.svelte";
import NavbarDocsNav from "@components/navbar/NavbarDocsNav.svelte";
import NavbarDocsNavTitle from "@components/navbar/NavbarDocsNavTitle.astro";
import NavbarDocsNavMenu from "@components/navbar/NavbarDocsNavMenu.astro";

import HeroBackgroundSrc from "@assets/images/background.png";
import { getImage } from "astro:assets";
Expand All @@ -25,9 +22,9 @@ export interface Props {
}

const navPages = [
{ slug: "/docs/", text: "Documentation", text_sm: "Docs" },
{ slug: "https://docs.seqera.io/multiqc", text: "Documentation", text_sm: "Docs" },
{ slug: "/example-reports/", text: "Examples" },
{ slug: "/modules/", text: "Supported Tools", text_sm: "Tools" },
{ slug: "https://docs.seqera.io/multiqc/modules/", text: "Supported Tools", text_sm: "Tools" },
{
text: "Resources",
items: [
Expand All @@ -38,7 +35,7 @@ const navPages = [
{ slug: "/citation/", text: "Citation" },
],
},
{ slug: "https://community.seqera.io/c/multiqc/6", text: "Forums" },
{ slug: "https://community.seqera.io/multiqc", text: "Forums" },
];

const { title, headings = [], navbarItems = navPages } = Astro.props;
Expand All @@ -51,12 +48,4 @@ const { title, headings = [], navbarItems = navPages } = Astro.props;
<header class="sticky top-0 z-10" style={{ backgroundImage: `url(${optimizedBackground.src})` }}>
<NavbarMenu navbarItems={navbarItems} />
<NavbarMenuMobile headings={headings} navbarItems={navbarItems} location={location} client:load />
{
Astro.url.pathname.includes("/docs/") && (
<NavbarDocsNav client:load>
<NavbarDocsNavTitle slot="title" title={title} />
<NavbarDocsNavMenu slot="menu" />
</NavbarDocsNav>
)
}
</header>
39 changes: 0 additions & 39 deletions src/components/navbar/NavbarDocsNav.svelte

This file was deleted.

55 changes: 0 additions & 55 deletions src/components/navbar/NavbarDocsNavMenu.astro

This file was deleted.

27 changes: 0 additions & 27 deletions src/components/navbar/NavbarDocsNavTitle.astro

This file was deleted.

1 change: 0 additions & 1 deletion src/config.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,6 @@ const reportCollection = defineCollection({
}),
});

const docsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
order: z.number().optional(),
}),
});

const modulesCollection = defineCollection({
type: "content",
schema: z.object({
name: z.string(),
urls: z.array(z.string().url()),
summary: z.string(),
extra_description: z.string().optional(),
}),
});

export const collections = {
"example-reports": reportCollection,
docs: docsCollection,
modules: modulesCollection,
};
1 change: 0 additions & 1 deletion src/content/docs

This file was deleted.

1 change: 0 additions & 1 deletion src/content/modules

This file was deleted.

1 change: 0 additions & 1 deletion src/docs/images

This file was deleted.

Loading
Loading