Correction des balises meta #39

This commit is contained in:
Colin Maudry
2025-09-28 22:08:03 +02:00
parent 70c5b91e6d
commit ce9d23100d
7 changed files with 53 additions and 52 deletions
+1 -38
View File
@@ -1,5 +1,4 @@
import logging
import os
import dash_bootstrap_components as dbc
from dash import Dash, dcc, html, page_container, page_registry
@@ -8,47 +7,11 @@ from flask import send_from_directory
load_dotenv()
domain_name = (
"test.decp.info" if os.getenv("DEVELOPMENT").lower() == "true" else "decp.info"
)
image_url = f"https://{domain_name}/assets/decp.info.png"
title = "decp.info - exploration des marchés publics français"
description = (
"Explorez et analysez les données des marchés publics français avec cet outil libre et gratuit. "
"Pour une commande publique accessible à toutes et tous."
)
app = Dash(
external_stylesheets=[dbc.themes.SIMPLEX],
title="decp.info",
use_pages=True,
compress=True,
meta_tags=[
{
"property": "og:image",
"content": image_url,
},
{
"name": "twitter:image",
"content": image_url,
},
{
"property": "og:title",
"content": title,
},
{
"name": "twitter:title",
"content": title,
},
{
"property": "og:description",
"content": description,
},
{
"name": "twitter:description",
"content": description,
},
],
)
# COSMO (belle font, blue),
# UNITED (rouge, ubuntu font),
@@ -71,7 +34,7 @@ logging.basicConfig(
app.index_string = """
<!DOCTYPE html>
<html>
<html lang="fr">
<head>
{%metas%}
<title>{%title%}</title>