Skip to content

Commit

Permalink
feat: use meta description in JSON-LD
Browse files Browse the repository at this point in the history
  • Loading branch information
dziudek committed Mar 18, 2021
1 parent 3a97e2f commit 0ee0898
Show file tree
Hide file tree
Showing 4 changed files with 367 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[Publii](https://getpublii.com/) is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast
and hassle-free, even for beginners.

**Current version: 0.38.0 (build 14165)**
**Current version: 0.38.0 (build 14167)**

## Why Publii?
Unlike static-site generators that are often unwieldy and difficult to use, Publii provides an
Expand Down
2 changes: 1 addition & 1 deletion app/back-end/builddata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.38.0","build":14165}
{"version":"0.38.0","build":14167}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ function jsonLDHelper(rendererInstance, Handlebars) {
};
}

jsonLDObject['description'] = context.data.root.post.excerpt;
if (context.data.root.metaDescriptionRaw) {
jsonLDObject['description'] = context.data.root.metaDescriptionRaw.replace(/"/g, "'");
} else {
jsonLDObject['description'] = context.data.root.post.excerpt;
}

if (context.data.root.post.author && context.data.root.post.author.name) {
jsonLDObject['author'] = {
Expand Down
Loading

0 comments on commit 0ee0898

Please sign in to comment.