retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.02k stars 201 forks source link

How to add Meta Description for each pages? #638

Open blakstrox opened 9 months ago

blakstrox commented 9 months ago

I tried to add meta description using meta.description just like meta.title. But it not working.

I tried to add the below information to a page containing profile documentation and it never works

---
icon: person
title: My Profile Page
meta:
  title: "Profile Page"
  description: "Profile Meta Description"
---
# Profile
Canadastartes commented 9 months ago

The description property is on the root level, not under the meta node.

geoffreymcgill commented 9 months ago

As noted by @paralexm, the description should be added on the root level of the page config, which I admit is confusing.

---
icon: person
title: My Profile Page
meta:
  title: "Profile Page"
description: "Profile Meta Description"
---
# Profile

The description setting was supported since the first public release of Retype, whereas the meta.title setting was not included until recently with the v3.0.0 release.

We should likely add meta.description too and only support the root description for backwards compatibility reasons.

geoffreymcgill commented 9 months ago

I have logged adding meta.description as an enhancement request. Retype would support both settings.

We will review and try to get this included in one of the upcoming releases.