Skip to content

Commit 243ff71

Browse files
committed
Set up taxonomies.
- Add levels, sensors and materials as taxonomies - Simplify translations to same taxonomy names in all languages while only translating displayed names. (still some work to do here) - Rename requiredMaterials to materials to fix some problems and simplify URLs - For now remove root index and only allow for browsing instructions (Might change if section worksheets is added in the future) - Add template to actually list the results of a taxonomy term
1 parent 272aa49 commit 243ff71

File tree

18 files changed

+116
-43
lines changed

18 files changed

+116
-43
lines changed

archetypes/en/instruction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sensors: # used by phyphox. Remove those which are not used
2929
- 'Speaker'
3030
levels: ['0', '1', '2a', '2b', '3', '6', '7'] # see doc for explanation. Remove everything else
3131
video: ['no', 'English', 'Localized', 'Silent'] # choose accordingly
32-
requiredMaterials:
32+
materials:
3333
- 'Smartphone only'
3434
- 'Household items'
3535
- 'Basic experiment material'

config/_default/hugo.yaml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ defaultContentLanguage: en
1313
languages:
1414
en:
1515
contentDir: content/en
16-
permalinks:
17-
page:
18-
instructions: /instructions/:slug/
19-
20-
taxonomies:
21-
category: "categories"
22-
tag: "tags"
2316

2417
disabled: false
2518
languageCode: en-US
@@ -33,17 +26,6 @@ languages:
3326
de:
3427
contentDir: content/de
3528

36-
permalinks:
37-
categories: "/:section/:slug"
38-
page:
39-
instructions: /anleitungen/:slug/
40-
section:
41-
instructions: /anleitungen/
42-
43-
taxonomies:
44-
category: "Kategorien"
45-
tag: "Stichwörter"
46-
4729
disabled: false
4830
languageCode: de-DE
4931
languageDirection: ltr
@@ -62,6 +44,14 @@ languages:
6244
taxonomies:
6345
category: categories
6446
tag: tags
47+
level: levels
48+
sensor: sensors
49+
material: materials
50+
51+
disableKinds:
52+
- home
53+
54+
ignorefiles: "generated/.*"
6555

6656
enableEmoji: true
6757
markup:

content/de/_index.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/de/instructions/inelastischer-stoss/inelastischer-stoss.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ author:
77
- Sebastian Staacks
88
CreativeCommons: ['BY']
99
categories:
10-
- 'Mechanik'
10+
- 'Mechanics'
1111
sensors:
12-
- 'Mikrofon'
12+
- 'Microphone'
1313
levels: ['2a', '2b', '3', '6'] # see doc for explanation. Remove everything else
1414
video: ['Localized']
15-
requiredMaterials:
16-
- 'Haushaltsgegenstände'
15+
materials:
16+
- 'Household items'
1717
tags: # All Tags start upper-case expect for 'phyphox'. This list can be expanded!
1818
- 'Ball'
1919
- 'Inelastischer Stoß'
@@ -24,9 +24,7 @@ tags: # All Tags start upper-case expect for 'phyphox'. This list can be expande
2424
summary: 'Bestimme die Anfangshöhe und die Energiebilanz eines springenden Balls anhand der Zeiten seiner Stoßgeräusche.'
2525
version: '0.1.0'
2626

27-
#Todo: Sketch of setup, photo of setup, Physics background
2827
---
29-
# Inelastischer Stoß
3028

3129
{{< youtube sqCEo4tj3e4 >}}
3230

content/en/_index.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/en/instructions/inelastic-collision/inelastic-collision.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
translationKey: "Inelastic Collision Instruction"
32
title: "(In)elastic Collision"
43
date: 2024-12-17T11:42:40+01:00
4+
translationKey: "Inelastic Collision Instruction"
55
draft: false
66
author:
77
- Sebastian Staacks
@@ -12,7 +12,7 @@ sensors:
1212
- 'Microphone'
1313
levels: ['2a', '2b', '3', '6'] # see doc for explanation. Remove everything else
1414
video: ['English']
15-
requiredMaterials:
15+
materials:
1616
- 'Household items'
1717
tags: # All Tags start upper-case expect for 'phyphox'. This list can be expanded!
1818
- 'Ball'
@@ -23,10 +23,7 @@ tags: # All Tags start upper-case expect for 'phyphox'. This list can be expande
2323
- 'Acoustic Stopwatch'
2424
summary: 'Determine the initial height and loss of energy of a bouncing ball from the timing of its impact sounds'
2525
version: '0.1.0'
26-
27-
#Todo: Sketch of setup, photo of setup, Physics background
2826
---
29-
# Inelastic Collision
3027

3128
{{< youtube ikvtPDwV1FE >}}
3229

i18n/de.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@
2323
- translations: "Übersetzungen"
2424
- version: "Version"
2525
- website: "Webseite"
26+
- levels: "Niveaus"
27+
- sensors: "Sensoren"
28+
- Microphone: "Mikrofon"
29+
- Accelerometer: "Beschleunigungssensor"
30+
- Magnetometer: "Magnetometer"
31+
- Gyroscope: "Gyroskop"
32+
- Pressure: "Druck"
33+
- requiredMaterials: "Benötigte Materialien"
34+
- Smartphone only: "Nur Smartphone"
35+
- Household items: "Haushaltsgegenstände"
36+
- Basic experiment material: "Experiment-Grundausstattung"
37+
- Special equipment: "Spezielle Geräte"

i18n/en.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@
2323
- translations: "Translations"
2424
- version: "version"
2525
- website: "website"
26+
- levels: "levels"
27+
- sensors: "sensors"
28+
- Microphone: "Microphone"
29+
- Accelerometer: "Accelerometer"
30+
- Magnetometer: "Magnetometer"
31+
- Gyroscope: "Gyroscope"
32+
- Pressure: "Druck"
33+
- requiredMaterials: "required materials"
34+
- Smartphone only: "Smartphone only"
35+
- Household items: "Household items"
36+
- Basic experiment material: "Basic experiment material"
37+
- Special equipment: "Special equipment"

layouts/_default/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{{- define "main" -}}
22
{{- .Content -}}
3-
{{- end -}}
3+
{{- end -}}

layouts/_default/taxonomy.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{ define "main" }}
2+
<h1>{{ .Title }}</h1>
3+
{{ .Content }}
4+
{{ range .Pages }}
5+
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
6+
{{ end }}
7+
{{ end }}

0 commit comments

Comments
 (0)