Skip to content
Open
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
10 changes: 7 additions & 3 deletions src/components/markdown/RuleEmbed.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ interface Props {
ruleName?: string;
ruleId?: number;
fields?: RuleFields[] | "All";
onRulePage?: boolean;
}

const { rule: rule, ruleName, ruleId, fields = [] } = Astro.props;
const { rule: rule, ruleName, ruleId, fields = [], onRulePage } = Astro.props;

let ruleEntry = rule;

Expand Down Expand Up @@ -61,9 +62,12 @@ const shouldShowGroup = (groupFields: RuleFields[]): boolean => {
};
---

<Box>
<Box data-pagefind-weight={onRulePage ? undefined : 0.9}>
<div class="border-b mt-0">
<h3 class="m-0 text-base flex">
<h3
class="m-0 text-base flex"
data-pagefind-ignore={onRulePage ? true : undefined}
>
<span class="border-r px-2 py-1 block">
Rule {ruleData.id}<span class="w-0 collapse inline-block">:{` `}</span>
</span>
Expand Down
1 change: 1 addition & 0 deletions src/components/markdown/RuleEmbedPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const rulesForApproved = rules.filter(
{ depth: 2, slug: "finished", text: "Finished +" },
{ depth: 2, slug: "approved", text: "Approved" },
]}
pagefindIgnore={true}
>
<section id="draft">
<h2>Draft+ entries</h2>
Expand Down
1 change: 1 addition & 0 deletions src/components/ui/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const Alert = React.forwardRef<
ref={ref}
role="alert"
className={cn(alertVariants({ variant }), className)}
data-pagefind-ignore
{...props}
/>
));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/rules/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const description = await stripText(entry.data.excerpt || entry.body);
}
</script>

<RuleEmbed rule={entry} fields={"All"} />
<RuleEmbed rule={entry} fields={"All"} onRulePage={true} />

{content && <content.Content />}

Expand Down
5 changes: 4 additions & 1 deletion src/pages/tags/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const taggedEntries: CollectionEntry<"docs">[] = (
).filter((entry) => entry.data.tags.includes(tag));
---

<DocPageLayout frontmatter={{ title: `All pages for tag "${tag}"` }}>
<DocPageLayout
frontmatter={{ title: `All pages for tag "${tag}"` }}
pagefindIgnore={true}
>
<ul class="list-disc list-inside">
{
taggedEntries.map((entry) => (
Expand Down