Skip to content

Commit 771fe29

Browse files
committed
use <defs>
1 parent 5ea1943 commit 771fe29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/docusaurus-theme-classic/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
getAnnouncementBarInlineScript,
1515
DataAttributeQueryStringInlineJavaScript,
1616
} from './inlineScripts';
17-
import {SvgSpriteSymbols} from './inlineSvgSprites';
17+
import {SvgSpriteDefs} from './inlineSvgSprites';
1818
import type {LoadContext, Plugin} from '@docusaurus/types';
1919
import type {ThemeConfig} from '@docusaurus/theme-common';
2020
import type {Plugin as PostCssPlugin} from 'postcss';
@@ -128,7 +128,7 @@ export default function themeClassic(
128128
xmlns: 'http://www.w3.org/2000/svg',
129129
style: 'display: none;',
130130
},
131-
innerHTML: SvgSpriteSymbols,
131+
innerHTML: SvgSpriteDefs,
132132
},
133133
{
134134
tagName: 'script',

packages/docusaurus-theme-classic/src/inlineSvgSprites.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
// For icons that are heavily repeated in the static html output
99
// See also https://github.com/facebook/docusaurus/issues/5865
10-
export const SvgSpriteSymbols = `
10+
export const SvgSpriteDefs = `<defs>
1111
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z" /></symbol>
12-
`;
12+
</defs>`;

0 commit comments

Comments
 (0)