From 3fe9db8da29e316ce51ad3a2ee99f6211469627a Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Mon, 25 Jun 2018 18:10:07 +0200 Subject: [PATCH] add meta description --- blog/view/detail.ls | 5 +++-- blog/view/top.ls | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blog/view/detail.ls b/blog/view/detail.ls index 4346d65..6304ece 100644 --- a/blog/view/detail.ls +++ b/blog/view/detail.ls @@ -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 diff --git a/blog/view/top.ls b/blog/view/top.ls index d2bf60f..d8d1bd4 100644 --- a/blog/view/top.ls +++ b/blog/view/top.ls @@ -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 @@ + + + +