mirror of https://github.com/status-im/codimd.git
feature: pass-through yaml metadata image to html meta tag
Signed-off-by: schokotets <moritzleni@gmail.com>
This commit is contained in:
parent
7b148457a7
commit
2c9f73cfb2
|
@ -121,6 +121,7 @@ async function showPublishNote (req, res) {
|
|||
const data = {
|
||||
title: title,
|
||||
description: meta.description || (markdown ? Note.generateDescription(markdown) : null),
|
||||
image: meta.image,
|
||||
viewcount: note.viewcount,
|
||||
createtime: createTime,
|
||||
updatetime: updateTime,
|
||||
|
|
|
@ -40,6 +40,17 @@ This option will set the note description.
|
|||
description: meta description
|
||||
```
|
||||
|
||||
image
|
||||
---
|
||||
This option will set the html meta tag 'image'.
|
||||
|
||||
> default: not set
|
||||
|
||||
**Example**
|
||||
```yml
|
||||
image: https://raw.githubusercontent.com/hackmdio/codimd/develop/public/screenshot.png
|
||||
```
|
||||
|
||||
tags
|
||||
---
|
||||
This option will set the tags which prior than content tags.
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
<% if(typeof robots !== 'undefined' && robots) { %>
|
||||
<meta name="robots" content="<%= robots %>">
|
||||
<% } %>
|
||||
<% if(typeof image !== 'undefined' && image) { %>
|
||||
<meta name="image" content="<%= image %>">
|
||||
<% } %>
|
||||
<% if(typeof description !== 'undefined' && description) { %>
|
||||
<meta name="description" content="<%= description %>">
|
||||
<% } %>
|
||||
|
|
Loading…
Reference in New Issue