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
6 changes: 6 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { satteri } from '@astrojs/markdown-satteri';
import mdx from '@astrojs/mdx';
import { attributeMarkdown, wrapTables } from '/src/themes/octopus/utilities/custom-markdown.mjs';
import llmMdEmitter from './src/integrations/llm-md-emitter.ts';
import pagefindIndex from './src/integrations/pagefind-index.ts';
import pruneDist from './src/integrations/prune-dist.ts';
import satteriHeadingId from './src/plugins/satteri-heading-id.js';
import satteriApiExamples, { apiExampleDirective } from './src/plugins/satteri-api-examples.js';
import { endpointDirective } from './src/plugins/satteri-endpoint.js';
import satteriWbr from './src/plugins/satteri-wbr.js';
import pagefindImageAttrs from './src/plugins/pagefind-image-attrs.js';
import shikiCodeBlock from './src/plugins/shiki-code-block.js';

// https://astro.build/config
Expand All @@ -22,6 +24,9 @@ export default defineConfig({
integrations: [
mdx(),
llmMdEmitter(),
// After the page emitters, and before the prune that would delete its
// output
pagefindIndex(),
// Must run last: strips build output that can't be served under /docs/
pruneDist()
],
Expand Down Expand Up @@ -63,6 +68,7 @@ export default defineConfig({
],
hastPlugins: [
satteriWbr,
pagefindImageAttrs,
satteriApiExamples
],
}),
Expand Down
1 change: 1 addition & 0 deletions dictionary-octopus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ Ozar
PAAS
packageid
packageversion
pagefind
passout
PathtoPublish
pemstore
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
"astro-accelerator-utils": "^0.3.84",
"glob": "^13.0.6",
"gray-matter": "^4.0.3",
"html-to-text": "^10.0.0",
"keyword-extractor": "^0.0.28",
"optional": "^0.1.4",
"pagefind": "^1.5.2",
"satteri": "^0.9.5",
"sharp": "^0.34.5"
},
Expand Down
139 changes: 73 additions & 66 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/components/ArticleHeader.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ type Props = {
lang: string;
subtitle?: string | null;
title: string;
/** Passed to `data-pagefind-weight`. Omitted leaves Pagefind's own heading
* weighting alone. */
searchWeight?: number;
};
const { lang, subtitle, title } = Astro.props satisfies Props;
const { lang, subtitle, title, searchWeight } = Astro.props satisfies Props;

// Language
const _ = Lang(lang);
Expand All @@ -22,7 +25,7 @@ const _ = Lang(lang);
stats.stop();
---

<header class="header">
<header class="header" data-pagefind-weight={searchWeight}>
<h1 class="header__title">{title}</h1>
{subtitle && <p class="header__subtitle">{subtitle}</p>}
</header>
Loading