-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edddafd
commit 9cd3bf6
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import DefaultAdmonitionTypes from "@theme-original/Admonition/Types"; | ||
|
||
function FaqAdmonition(props) { | ||
return ( | ||
<div itemScope itemProp="mainEntity" itemType="https://schema.org/Question"> | ||
<span itemProp="name" style={{ display: "none" }}> | ||
{props.title} | ||
</span> | ||
<div | ||
itemScope | ||
itemProp="acceptedAnswer" | ||
itemType="https://schema.org/Answer" | ||
> | ||
<div itemProp="text">{props.children}</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
const AdmonitionTypes = { | ||
...DefaultAdmonitionTypes, | ||
|
||
// Add all your custom admonition types here... | ||
// You can also override the default ones if you want | ||
faq: FaqAdmonition, | ||
}; | ||
|
||
export default AdmonitionTypes; |