From ea46982115b397ba5a9131719409d2c81b446719 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Tue, 16 Dec 2025 12:54:17 +0100 Subject: [PATCH 1/2] fix json code sample --- docs/tariffs.mdx | 28 +++++++++++++++---- docs/tariffs/_dynamischer_strompreis.mdx | 12 ++++---- .../current/tariffs.mdx | 26 ++++++++++++++--- .../tariffs/_dynamic_electricity_price.mdx | 10 ++++--- 4 files changed, 56 insertions(+), 20 deletions(-) diff --git a/docs/tariffs.mdx b/docs/tariffs.mdx index fe485b3bd..734f4943d 100644 --- a/docs/tariffs.mdx +++ b/docs/tariffs.mdx @@ -286,13 +286,29 @@ Plugins können weiterhin Daten in stündlichen Intervallen liefern, diese werde Siehe nachfolgendes Beispiel mit 15-Minuten-Intervallen: -```js +```json [ - { start: "2025-01-01T00:00:00Z", end: "2025-01-01T00:15:00Z", value: 25.0 }, - { start: "2025-01-01T00:15:00Z", end: "2025-01-01T00:30:00Z", value: 26.5 }, - { start: "2025-01-01T00:30:00Z", end: "2025-01-01T00:45:00Z", value: 24.8 }, - { start: "2025-01-01T00:45:00Z", end: "2025-01-01T01:00:00Z", value: 27.2 }, -]; + { + "start": "2025-01-01T00:00:00Z", + "end": "2025-01-01T00:15:00Z", + "value": 25.0 + }, + { + "start": "2025-01-01T00:15:00Z", + "end": "2025-01-01T00:30:00Z", + "value": 26.5 + }, + { + "start": "2025-01-01T00:30:00Z", + "end": "2025-01-01T00:45:00Z", + "value": 24.8 + }, + { + "start": "2025-01-01T00:45:00Z", + "end": "2025-01-01T01:00:00Z", + "value": 27.2 + } +] ``` Das Plugin wird einmal pro Stunde aktualisiert. diff --git a/docs/tariffs/_dynamischer_strompreis.mdx b/docs/tariffs/_dynamischer_strompreis.mdx index 5b5ba8b04..dcb6ffafa 100644 --- a/docs/tariffs/_dynamischer_strompreis.mdx +++ b/docs/tariffs/_dynamischer_strompreis.mdx @@ -36,13 +36,13 @@ Plugins können weiterhin Daten in stündlichen Intervallen liefern, diese werde Siehe nachfolgendes Beispiel mit 15-Minuten-Intervallen: -```js +```json [ - { start: "2025-01-01T00:00:00Z", end: "2025-01-01T00:15:00Z", value: 25.0 }, - { start: "2025-01-01T00:15:00Z", end: "2025-01-01T00:30:00Z", value: 26.5 }, - { start: "2025-01-01T00:30:00Z", end: "2025-01-01T00:45:00Z", value: 24.8 }, - { start: "2025-01-01T00:45:00Z", end: "2025-01-01T01:00:00Z", value: 27.2 }, -]; + { "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T00:15:00Z", "value": 25.0 }, + { "start": "2025-01-01T00:15:00Z", "end": "2025-01-01T00:30:00Z", "value": 26.5 }, + { "start": "2025-01-01T00:30:00Z", "end": "2025-01-01T00:45:00Z", "value": 24.8 }, + { "start": "2025-01-01T00:45:00Z", "end": "2025-01-01T01:00:00Z", "value": 27.2 } +] ``` Das Plugin wird einmal pro Stunde aktualisiert. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx b/i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx index 5f9a4717a..ddb20f6a8 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx @@ -282,11 +282,29 @@ The plugin must return a JSON structure containing a list of time periods and pr The date fields must be in the form `YYYY-MM-DDTHH:MM:SSZ` and the price in the correct currency unit (e.g. EUR). See the following example: -```js +```json [ - { start: "2025-01-01T00:00:00Z", end: "2025-01-01T01:00:00Z", value: 25.0 }, - { start: "2025-01-01T01:00:00Z", end: "2025-01-01T02:00:00Z", value: 30.0 }, -]; + { + "start": "2025-01-01T00:00:00Z", + "end": "2025-01-01T00:15:00Z", + "value": 25.0 + }, + { + "start": "2025-01-01T00:15:00Z", + "end": "2025-01-01T00:30:00Z", + "value": 26.5 + }, + { + "start": "2025-01-01T00:30:00Z", + "end": "2025-01-01T00:45:00Z", + "value": 24.8 + }, + { + "start": "2025-01-01T00:45:00Z", + "end": "2025-01-01T01:00:00Z", + "value": 27.2 + } +] ``` The plugin is updated once per hour. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx b/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx index dd3365813..d5449d833 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx @@ -31,11 +31,13 @@ The plugin must return a JSON structure containing a list of time periods and pr The date fields must be in the form `YYYY-MM-DDTHH:MM:SSZ` and the price in the correct currency unit (e.g. EUR). See the following example: -```js +```json [ - { start: "2025-01-01T00:00:00Z", end: "2025-01-01T01:00:00Z", value: 25.0 }, - { start: "2025-01-01T01:00:00Z", end: "2025-01-01T02:00:00Z", value: 30.0 }, -]; + { "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T00:15:00Z", "value": 25.0 }, + { "start": "2025-01-01T00:15:00Z", "end": "2025-01-01T00:30:00Z", "value": 26.5 }, + { "start": "2025-01-01T00:30:00Z", "end": "2025-01-01T00:45:00Z", "value": 24.8 }, + { "start": "2025-01-01T00:45:00Z", "end": "2025-01-01T01:00:00Z", "value": 27.2 } +] ``` The plugin is updated once per hour. From 70d7a97776886f6a5db64ff3432afbbe68771798 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Tue, 16 Dec 2025 12:57:39 +0100 Subject: [PATCH 2/2] fmt --- docs/tariffs/_dynamischer_strompreis.mdx | 24 +++++++++++++++---- .../tariffs/_dynamic_electricity_price.mdx | 24 +++++++++++++++---- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/docs/tariffs/_dynamischer_strompreis.mdx b/docs/tariffs/_dynamischer_strompreis.mdx index dcb6ffafa..3f7aa45e3 100644 --- a/docs/tariffs/_dynamischer_strompreis.mdx +++ b/docs/tariffs/_dynamischer_strompreis.mdx @@ -38,10 +38,26 @@ Siehe nachfolgendes Beispiel mit 15-Minuten-Intervallen: ```json [ - { "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T00:15:00Z", "value": 25.0 }, - { "start": "2025-01-01T00:15:00Z", "end": "2025-01-01T00:30:00Z", "value": 26.5 }, - { "start": "2025-01-01T00:30:00Z", "end": "2025-01-01T00:45:00Z", "value": 24.8 }, - { "start": "2025-01-01T00:45:00Z", "end": "2025-01-01T01:00:00Z", "value": 27.2 } + { + "start": "2025-01-01T00:00:00Z", + "end": "2025-01-01T00:15:00Z", + "value": 25.0 + }, + { + "start": "2025-01-01T00:15:00Z", + "end": "2025-01-01T00:30:00Z", + "value": 26.5 + }, + { + "start": "2025-01-01T00:30:00Z", + "end": "2025-01-01T00:45:00Z", + "value": 24.8 + }, + { + "start": "2025-01-01T00:45:00Z", + "end": "2025-01-01T01:00:00Z", + "value": 27.2 + } ] ``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx b/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx index d5449d833..f4f21dab8 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx @@ -33,10 +33,26 @@ See the following example: ```json [ - { "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T00:15:00Z", "value": 25.0 }, - { "start": "2025-01-01T00:15:00Z", "end": "2025-01-01T00:30:00Z", "value": 26.5 }, - { "start": "2025-01-01T00:30:00Z", "end": "2025-01-01T00:45:00Z", "value": 24.8 }, - { "start": "2025-01-01T00:45:00Z", "end": "2025-01-01T01:00:00Z", "value": 27.2 } + { + "start": "2025-01-01T00:00:00Z", + "end": "2025-01-01T00:15:00Z", + "value": 25.0 + }, + { + "start": "2025-01-01T00:15:00Z", + "end": "2025-01-01T00:30:00Z", + "value": 26.5 + }, + { + "start": "2025-01-01T00:30:00Z", + "end": "2025-01-01T00:45:00Z", + "value": 24.8 + }, + { + "start": "2025-01-01T00:45:00Z", + "end": "2025-01-01T01:00:00Z", + "value": 27.2 + } ] ```