Improve site metadata #157

Closed
opened 2018-09-26 23:33:19 +02:00 by kauffj · 2 comments
kauffj commented 2018-09-26 23:33:19 +02:00 (Migrated from github.com)

Currently, it is not possible for individual pages to set things like their title, description, or og:image.

It should be possible to set all metadata values from both custom views as well as markdown pages.

Currently, it is not possible for individual pages to set things like their title, description, or og:image. It should be possible to set all metadata values from both custom views as well as markdown pages.
NetOpWibby commented 2018-09-28 23:22:21 +02:00 (Migrated from github.com)

This now exists for Markdown pages. Example:

---
meta:
- description: This is the sitemap for LBRY.tech
- og:image: /assets/media/images/carlsagan2.jpg
- og:image:height: 300
- og:image:width: 400
- title: Hooray!
title: Sitemap
---

The scoped title in meta will overwrite the second title declaration.

This now exists for Markdown pages. Example: ```yaml --- meta: - description: This is the sitemap for LBRY.tech - og:image: /assets/media/images/carlsagan2.jpg - og:image:height: 300 - og:image:width: 400 - title: Hooray! title: Sitemap --- ``` The scoped title in `meta` will overwrite the second title declaration.
NetOpWibby commented 2018-09-28 23:35:51 +02:00 (Migrated from github.com)

This works for custom views as well. Example:

state.lbry = {
  description: "This is the API page for LBRY.tech",
  "og:image": "/assets/media/images/carlsagan2.jpg",
  "og:image:height": 300,
  "og:image:width": 400
};

I've left a commented-out example here: https://github.com/lbryio/lbry.tech/blob/master/app/views/api.js

This works for custom views as well. Example: ```js state.lbry = { description: "This is the API page for LBRY.tech", "og:image": "/assets/media/images/carlsagan2.jpg", "og:image:height": 300, "og:image:width": 400 }; ``` I've left a commented-out example here: https://github.com/lbryio/lbry.tech/blob/master/app/views/api.js
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry.tech#157
No description provided.