mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
add meta description
This commit is contained in:
parent
31c371b2c1
commit
3fe9db8da2
@ -3,6 +3,7 @@
|
||||
local data = arg[1]
|
||||
local order = arg[2]
|
||||
local content = nil;
|
||||
local url = nil
|
||||
local topview = loadscript(BLOG_ROOT.."/view/top.ls")
|
||||
local class = "card"
|
||||
if HEADER.mobile then
|
||||
@ -31,9 +32,9 @@
|
||||
title = content:sub(b+1, c-1)
|
||||
end
|
||||
end
|
||||
topview(title, true)
|
||||
url = "https://blog.lxsang.me/r:id:"..data.id
|
||||
topview(title, true, url, data.tags)
|
||||
end
|
||||
local url = "https://blog.lxsang.me/r:id:"..data.id
|
||||
-- fetch the similar posts from database
|
||||
local db = require("db.model").get(BLOG_ADMIN,"st_similarity", nil)
|
||||
local similar_posts = nil
|
||||
|
@ -2,6 +2,8 @@
|
||||
local arg = {...}
|
||||
local title = arg[1]
|
||||
local render = arg[2]
|
||||
local url = arg[3]
|
||||
local tags = arg[4]
|
||||
local cls = ""
|
||||
if HEADER.mobile then
|
||||
cls = "navmobile"
|
||||
@ -27,6 +29,10 @@
|
||||
<script src="rst/gscripts/jquery-3.2.1.min.js"> </script>
|
||||
<script src="rst/main.js"></script>
|
||||
<?lua if render then ?>
|
||||
<meta property="og:url" content="<?=url?>" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="<?=title?>" />
|
||||
<meta property="og:description" content="<?=tags?>" />
|
||||
<link rel="stylesheet" type="text/css" href="rst/hljs/github.css" />
|
||||
<link rel="stylesheet" type="text/css" href="rst/katex/katex.min.css" />
|
||||
<script src="rst/hljs/highlight.pack.js"> </script>
|
||||
|
Loading…
Reference in New Issue
Block a user