Skip to content

Commit

Permalink
adicionando meta tags na pagina
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiscleverson committed Apr 21, 2024
1 parent 98df88a commit 568a6e0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
4 changes: 3 additions & 1 deletion app/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def render_text(slug):
title = data.title
body = data.body
date = convert_datetime(data.created_at).strftime("%d/%m/%Y, %H:%M %p")
slug = data.slug
description = data.description

return render_template('blog/render_text.html', title=title, body=body, date=date)
return render_template('blog/render_text.html', title=title, body=body, date=date, slug=slug, description=description)


def convert_datetime(datetime):
Expand Down
Binary file added static/imgs/thisiscleverson.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 20 additions & 5 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<title>this_is_cleverson</title>

{% if title != None %}
<title>{{title}}</title>
{%else%}
<title>this_is_cleverson</title>
{% endif %}

<meta property="og:site_name" content="this_is_cleverson">
<meta name="description" content={{description}}>

<meta property="og:title" content={{title}}>
<meta property="og:description" content={{description}}>
<meta property="og:url" content="https://cleverson.online/{{slug}}">
<meta property="og:image" content="{{ url_for('static', filename='imgs/thisiscleverson.jpg') }}">

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content={{title}}>
<meta name="twitter:description" content={{description}}>
<meta name="twitter:image" content="{{ url_for('static', filename='imgs/thisiscleverson.jpg') }}">

<link rel="icon" href="{{ url_for('static', filename='icons/linux.ico') }}" type="Linux icon">
<link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/markdown.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<meta
name="description"
content="Um blog sobre tecnologia"
/>
</head>
<body>
{% include 'components/header.html' %}
Expand Down

0 comments on commit 568a6e0

Please sign in to comment.