mirror of https://github.com/status-im/codimd.git
Merge pull request #1546 from schokotets/develop
feature: pass-through yaml metadata image to html meta tag
This commit is contained in:
commit
91fb54539a
|
@ -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