mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-23 12:43:08 +00:00
fix: headline in JSON-LD
This commit is contained in:
parent
f8001de437
commit
ed2c6bfb3f
1 changed files with 1 additions and 3 deletions
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue