Add twitter card

This commit is contained in:
nikurasu 2023-05-05 15:27:09 +02:00
parent 83e4003b15
commit e8a04b4f35
Signed by: Nikurasu
GPG key ID: 9E7F14C03EF1F271
3 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,7 @@
name: "Nikurasu" # The name on the linktree
# summaryText: 'A simple sample text' # A short summary for what you do, will appear if uncommened
# profilePic: # uncomment and set this if your profile pic has a custom name
url: "https://links.nikurasu.gay" # URL of your SocialTree
siteName: 'NikuHost' # Name of the site visible in embeds, used for Link previews
roundPB: false # Set true if you want a round profile picture
theme: '98' # Your theme

View file

@ -23,6 +23,7 @@ app.get('/', (req, res) => {
let config = yaml.load(fs.readFileSync('assets/config/config.yml'), 'utf8')
res.render('index', {
name: config.name,
url: config.url,
filenameProfilePic: config.profilePic ? config.profilePic : 'profilepic.jpg',
summaryText: config.summaryText ? config.summaryText: '',
links: config.links,

View file

@ -11,7 +11,14 @@
<link rel="stylesheet" href="style/round-pb.css">
<% } %>
<title><%= name %> - SocialTree</title>
<meta property="og:title" content="<%= name %> - SocialTree">
<meta property="og:image" content="img/<%= filenameProfilePic %>">
<meta property="description" content="<%= metaDescription %>">
<meta property="og:description" content="<%= metaDescription %>">
<meta property="og:site_name" content="<%= siteName %>">
<meta property="og:url" content="<%= url %>">
<meta property="twitter:image:src" content="img/<%= filenameProfilePic %>">
<meta property="twitter:card" content="summary">
<meta property="twitter:title" content="<%= name %> - SocialTree">
<meta property="twitter:description" content="<%= metaDescription %>">
</head>