mirror of
https://github.com/status-im/codimd.git
synced 2025-02-20 01:28:12 +00:00
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 = {
|
const data = {
|
||||||
title: title,
|
title: title,
|
||||||
description: meta.description || (markdown ? Note.generateDescription(markdown) : null),
|
description: meta.description || (markdown ? Note.generateDescription(markdown) : null),
|
||||||
|
image: meta.image,
|
||||||
viewcount: note.viewcount,
|
viewcount: note.viewcount,
|
||||||
createtime: createTime,
|
createtime: createTime,
|
||||||
updatetime: updateTime,
|
updatetime: updateTime,
|
||||||
|
@ -40,6 +40,17 @@ This option will set the note description.
|
|||||||
description: meta 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
|
tags
|
||||||
---
|
---
|
||||||
This option will set the tags which prior than content tags.
|
This option will set the tags which prior than content tags.
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
<% if(typeof robots !== 'undefined' && robots) { %>
|
<% if(typeof robots !== 'undefined' && robots) { %>
|
||||||
<meta name="robots" content="<%= robots %>">
|
<meta name="robots" content="<%= robots %>">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if(typeof image !== 'undefined' && image) { %>
|
||||||
|
<meta name="image" content="<%= image %>">
|
||||||
|
<% } %>
|
||||||
<% if(typeof description !== 'undefined' && description) { %>
|
<% if(typeof description !== 'undefined' && description) { %>
|
||||||
<meta name="description" content="<%= description %>">
|
<meta name="description" content="<%= description %>">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user