Skip to content

Commit

Permalink
Adds dataset specific og/twitter images
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Mar 3, 2022
1 parent 4ba2c9c commit c222ba3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/templates/dataset_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- OPENGRAPH -->
<meta content="MITFAHR|DE|ZENTRALE" property="og:title">
<meta content="{{ ld.image }}" property="og:image">
<meta content="{{ image_url }}" property="og:image">
<meta content="1280" property="og:image:width">
<meta content="904" property="og:image:height">
<meta content="MITFAHR|DE|ZENTRALE" property="og:site_name">
Expand All @@ -28,7 +28,7 @@
<meta name="twitter:creator" content="@mfdz_de">

<meta content="MITFAHR|DE|ZENTRALE" property="twitter:title">
<meta content="https://data.mfdz.de/img/data.jpg " property="twitter:image">
<meta content="{{ image_url }}" property="twitter:image">
<meta content="MITFAHR|DE|ZENTRALE Datensatz {{ ld.name }}" property="twitter:description">

<link href="https://mfdz.de/assets/css/bulma.min.css" rel="stylesheet">
Expand Down
2 changes: 1 addition & 1 deletion dpc/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def render_landing_page(dpc_file, dst_file, ld_file, datapackage_file, dataset_n
validation_ok = True if os.path.getsize(validation_results_file) == 0 else False

# render template with ld supplied as params
rendered_template = template.render(ld = ld, validation_ok = validation_ok, size = size)
rendered_template = template.render(ld = ld, image_url=dpc_data.get('image'), validation_ok = validation_ok, size = size)

datapackage_template = env.get_template('datapackage.json')
dataset = _enhanced_linked_data(ld, dataset_name, dpc_data.get('image'), DPC_CONFIG['host'])
Expand Down

0 comments on commit c222ba3

Please sign in to comment.