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

Commit b779482

Browse files
committed
Do not read search patterns
1 parent 061ba15 commit b779482

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/pages/modules/[module].astro

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { parse, stringify } from "yaml";
55
import { Icon } from "astro-icon/components";
66
import Button from "@components/Button.svelte";
77
import { getCollection } from "astro:content";
8-
import search_patterns from "@src/search_patterns.yaml";
98
109
export async function getStaticPaths() {
1110
const modules = await getCollection("modules");
@@ -17,24 +16,15 @@ export async function getStaticPaths() {
1716
props: {
1817
module: module,
1918
frontmatter: module.data,
20-
search_patterns: search_patterns,
2119
},
2220
}));
2321
}
2422
25-
const { module, frontmatter, search_patterns } = Astro.props;
23+
const { module, frontmatter } = Astro.props;
2624
2725
const { headings, Content, remarkPluginFrontmatter } = await module.render();
2826
const gh_url =
2927
"https://github.com/MultiQC/MultiQC/blob/main/docs/modules/" + module.id.split("/").pop();
30-
31-
// Filter search_patterns to only include keys containing key string
32-
const module_search_patterns = Object.keys(search_patterns)
33-
.filter((key) => key.includes(module.id.split("/").pop().replace(".md", "")))
34-
.reduce((obj, key) => {
35-
obj[key] = search_patterns[key];
36-
return obj;
37-
}, {});
3828
---
3929

4030
<PageLayout
@@ -49,17 +39,6 @@ const module_search_patterns = Object.keys(search_patterns)
4939
frontmatter.name,
5040
)}`}
5141
>
52-
<div class="prose max-w-none dark:prose-invert">
53-
<Content />
54-
{
55-
Object.keys(module_search_patterns).length > 0 && (
56-
<>
57-
<h2 id="module-search-patterns">File search patterns</h2>
58-
<Code code={stringify(module_search_patterns, null, 2)} lang="yaml" />
59-
</>
60-
)
61-
}
62-
</div>
6342
<div class="text-center">
6443
<Button to="/modules" variant="secondary" size="sm" classes="mt-12">
6544
<Icon name="mdi:arrow-left" class="-ml-1 mr-2 h-4 w-4" />

src/search_patterns.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)