vector battery table

This commit is contained in:
Thies Lennart Alff 2022-08-25 14:22:01 +02:00
parent ff2efd5ef2
commit 7e8fd8e38c
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,13 @@
---
title: Vector 3 Battery
date: 2022-08-25
categories: ['Cycling']
tags: ['cycling']
---
{{% table %}}
| Date | Distance (km) | Time (h)| Lifetime (h) |
| ---- | ------------- | ------- | ------------ |
| 23.03.22 | 4073.5 | 163.4 | - |
| 25.08.22 | 7306.6 | 284.2 | 120.8 |
{{% /table %}}

View file

@ -0,0 +1,6 @@
{{ $htmlTable := .Inner | markdownify }}
{{ $class := .Get 0 }}
{{ $old := "<table>" }}
{{ $new := printf "<table class=\"%s\">" $class }}
{{ $htmlTable := replace $htmlTable $old $new }}
{{ $htmlTable | safeHTML }}