Skip to content

Commit b9394a7

Browse files
committed
Absolute open graph image path
1 parent 832a24e commit b9394a7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

_data/examplesindex.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"brief": "This example shows how to tween animate the position of a game object.",
55
"category": "animation",
66
"layout": "example",
7-
"opengraph_image": "animation/basic_tween/basic_tween.png",
7+
"opengraph_image": "https://www.defold.com/examples/animation/basic_tween/basic_tween.png",
88
"path": "animation/basic_tween",
99
"scripts": "spaceship.script",
1010
"tags": "animation",
1111
"thumbnail": "basic_tween.png",
1212
"title": "Tween animation",
13-
"twitter_image": "animation/basic_tween/basic_tween.png"
13+
"twitter_image": "https://www.defold.com/examples/animation/basic_tween/basic_tween.png"
1414
},
1515
{
1616
"author": "Defold Foundation",

examples/animation/basic_tween/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ author: Defold Foundation
33
brief: This example shows how to tween animate the position of a game object.
44
category: animation
55
layout: example
6-
opengraph_image: animation/basic_tween/basic_tween.png
6+
opengraph_image: https://www.defold.com/examples/animation/basic_tween/basic_tween.png
77
path: animation/basic_tween
88
scripts: spaceship.script
99
tags: animation
1010
thumbnail: basic_tween.png
1111
title: Tween animation
12-
twitter_image: animation/basic_tween/basic_tween.png
12+
twitter_image: https://www.defold.com/examples/animation/basic_tween/basic_tween.png
1313
---
1414

1515
![tween](basic_tween.png)

update.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,9 @@ def process_examples(download = False):
779779
fm["path"] = "%s/%s" % (category, example)
780780
fm["layout"] = "example"
781781
if "thumbnail" in fm:
782-
fm["opengraph_image"] = fm["path"] + "/" + fm["thumbnail"]
783-
fm["twitter_image"] = fm["path"] + "/" + fm["thumbnail"]
782+
image_path = "https://www.defold.com/examples/%s/%s" % (fm["path"], fm["thumbnail"])
783+
fm["opengraph_image"] = image_path
784+
fm["twitter_image"] = image_path
784785
examplesindex.append(fm)
785786
replace_frontmatter(md_file, fm)
786787

0 commit comments

Comments
 (0)