site/add og meta tags

- title
- description
This commit is contained in:
SouthFox 2023-01-15 17:40:15 +08:00
parent c8b7232d56
commit 56fcc234a7

View file

@ -34,11 +34,18 @@
<% if (page.title){ %><meta property="og:title" content="<%= page.path %>"/><% } %> <% if (page.title){ %><meta property="og:title" content="<%= page.path %>"/><% } %>
<meta property="og:site_name" content="<%= config.title %>"/> <meta property="og:site_name" content="<%= config.title %>"/>
<% if (page.title){ %>
<meta name="og:title" content="<%= page.title %>">
<% } %>
<% if(page.cover) { %> <% if(page.cover) { %>
<meta property="og:image" content="<%= page.cover %>" /> <meta property="og:image" content="<%= page.cover %>" />
<% } else { %> <% } else { %>
<meta property="og:image" content="https://blog.southfox.me/favicon.png" <meta property="og:image" content="https://blog.southfox.me/favicon.png"
<% } %> <% } %>
<% if (page.description){ %>
<meta name="og:description" content="<%= page.description %>">
<% } %>
<% if (theme.rss){ %> <% if (theme.rss){ %>
<link rel="alternative" href="<%- url_for('./') %><%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml"> <link rel="alternative" href="<%- url_for('./') %><%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">