Skip to content

Commit

Permalink
more wikidata prepration
Browse files Browse the repository at this point in the history
  • Loading branch information
cmahnke committed Jan 4, 2025
1 parent 22ba12e commit 7b3096e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions content/post/image-hildesheimer-boerde/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Photo
- Travel
preview: img/IMG_4538.hdr.jpeg
wikidata: https://www.wikidata.org/wiki/Q1618449
---

The rest stop "Hildesheimer Börde" on a foggy night.
Expand Down
1 change: 1 addition & 0 deletions content/post/image-hildesheimer-boerde/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Photo
- Travel
preview: img/IMG_4538.hdr.jpeg
wikidata: https://www.wikidata.org/wiki/Q1618449
---

Eine nächtliche Aufnahme der Raststätte "Hildesheimer Börde" im Nebel.
Expand Down
1 change: 1 addition & 0 deletions content/post/instagram/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ date: 2021-05-31T15:23:46+02:00
tags:
- Projektemacher.org
- SocialMedia
wikidata: https://www.wikidata.org/wiki/Q209330
---
As of today there is an additional <i class="insta-inline"></i> [Instagram channel](https://www.instagram.com/projektemacher/). This is just an experiment for now. But what has already annoys me me: There doesn't seem to be an official and stable API for creating posts / uploading images - very disappointing!
1 change: 1 addition & 0 deletions content/post/instagram/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ date: 2021-05-31T15:23:46+02:00
tags:
- Projektemacher.org
- SocialMedia
wikidata: https://www.wikidata.org/wiki/Q209330
---
Seit heute gibt es einen ergänzenden <i class="insta-inline"></i> [Instagram Kanal](https://www.instagram.com/projektemacher/). Dies ist erstmal nur ein Experiment. Was aber schon negativ aufgefallen ist: Es scheint keine offizielle und stabile API zum Anlegen von Beiträgen zu geben - sehr unprofessionell!
1 change: 1 addition & 0 deletions content/post/pong/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- DigitalImages
- JavaScript
preview: pong-heatmap1.png
wikidata: https://www.wikidata.org/wiki/Q216293
---

For some reason I came up with the idea of visualising [Pong](https://de.wikipedia.org/wiki/Pong)...
Expand Down
1 change: 1 addition & 0 deletions content/post/pong/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- DigitalImages
- JavaScript
preview: pong-heatmap1.png
wikidata: https://www.wikidata.org/wiki/Q216293
---

Aus irgendeinem Grund bin ich auf die Idee gekommen [Pong](https://de.wikipedia.org/wiki/Pong) zu visualisieren...
Expand Down
14 changes: 13 additions & 1 deletion layouts/shortcodes/entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@
{{- $class = printf "%s %s" $class "external" -}}
{{- $external = true -}}
{{- end -}}
<a data-wikidata="{{ $id }}" {{ if ne $href "" }}href="{{ $href }}"{{ end }} {{ if ne $class "" }}class="{{ $class }}"{{ end }} {{ if ne $title "" }}title="{{ $title }}"{{ end }} {{ if $external }}target="_blank"{{ end }} >{{.Inner | safeHTML}}</a>

{{- $primaryLang := .Language.Lang -}}
{{- $langs := slice $primaryLang -}}
{{- range .Translations -}}
{{- $langs = $langs | append .Language.Lang -}}
{{- end -}}
{{- $name := partial "data/functions/wikidata-label.html" (dict "url" $id "langs" $langs) -}}

{{- if ne $name "" -}}
{{- $title = $name -}}
{{- end -}}

<a data-wikidata="{{ $id }}" data-label="{{ $name }}" {{ if ne $href "" }}href="{{ $href }}"{{ end }} {{ if ne $class "" }}class="{{ $class }}"{{ end }} {{ if ne $title "" }}title="{{ $title }}"{{ end }} {{ if $external }}target="_blank"{{ end }} >{{.Inner | safeHTML}}</a>

0 comments on commit 7b3096e

Please sign in to comment.