Skip to content

Commit

Permalink
rename helmet -> head
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Apr 14, 2022
1 parent 1771d77 commit 759d867
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-sitemap/src/createSitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type {ReactElement} from 'react';
export default async function createSitemap(
siteConfig: DocusaurusConfig,
routesPaths: string[],
helmet: {[location: string]: HelmetServerState},
head: {[location: string]: HelmetServerState},
options: PluginOptions,
): Promise<string> {
const {url: hostname} = siteConfig;
Expand All @@ -34,7 +34,7 @@ export default async function createSitemap(
return false;
}
// https://github.com/staylor/react-helmet-async/pull/167
const meta = helmet[route]?.meta.toComponent() as unknown as
const meta = head[route]?.meta.toComponent() as unknown as
| ReactElement[]
| undefined;
return !meta?.some(
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export type Plugin<Content = unknown> = {
postBuild?: (
props: Props & {
content: Content;
helmet: {[location: string]: HelmetServerState};
head: {[location: string]: HelmetServerState};
},
) => Promise<void> | void;
// TODO refactor the configureWebpack API surface: use an object instead of
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ async function buildLocale({
}
await plugin.postBuild({
...props,
helmet: headTags,
head: headTags,
content: plugin.content,
});
}),
Expand Down

0 comments on commit 759d867

Please sign in to comment.