1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 23:36:29 +02:00

#5422 Support for schema. News schema added and FAQs schema template simplified.

This commit is contained in:
camer0n
2025-01-31 11:54:19 -08:00
parent ec61237c03
commit b05fea833c
11 changed files with 599 additions and 211 deletions

View File

@@ -35,20 +35,20 @@ $FAQS_TEMPLATE['caption'] = "{FAQ_CAPTION} <small>{FAQ_COUNT}</small>";
/** @experimental */
$FAQS_TEMPLATE['schema']['start'] = '{
$FAQS_TEMPLATE['schema'] = '
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [';
$FAQS_TEMPLATE['schema']['item'] = '{
"@type": "Question",
"name": "{FAQ_QUESTION}",
"acceptedAnswer": {
"@type": "Answer",
"text": "{FAQ_ANSWER}"
}
}';
$FAQS_TEMPLATE['schema']['end'] = ']
}
';
"mainEntity": [
{
"@type": "Question",
"name": "{FAQ_QUESTION: html=0}",
"acceptedAnswer":
{
"@type": "Answer",
"text": "{FAQ_ANSWER: html=0}"
}
}
]
}
';