fix: headline in JSON-LD

This commit is contained in:
Ryan Yin 2023-06-30 17:13:44 +08:00
parent f8001de437
commit ed2c6bfb3f

View file

@ -1,8 +1,6 @@
import { generateSitemap as sitemap } from "sitemap-ts"; import { generateSitemap as sitemap } from "sitemap-ts";
import { PageData, defineConfig } from "vitepress"; import { PageData, defineConfig } from "vitepress";
const links = [];
function getJSONLD(pageData: PageData) { function getJSONLD(pageData: PageData) {
if (pageData.relativePath === "index.md") { if (pageData.relativePath === "index.md") {
return `{ return `{
@ -30,7 +28,7 @@ function getJSONLD(pageData: PageData) {
return `{ return `{
"@context":"http://schema.org", "@context":"http://schema.org",
"@type":"TechArticle", "@type":"TechArticle",
"headline":"NixOS & Flakes Book", "headline":"${pageData.title} | NixOS & Flakes Book",
"inLanguage":"${lang}", "inLanguage":"${lang}",
"mainEntityOfPage":{ "mainEntityOfPage":{
"@type":"WebPage", "@type":"WebPage",