From f1d15573af204e5a4a431dc3d04a4c3695575a45 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Fri, 10 Feb 2023 21:03:44 +0100 Subject: [PATCH] chore: doc --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 44b914b..50115ef 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,78 @@ Furthermore, it will parse the templates for images, anchors, and text. ##### Generate This will generate HTML files from the prepared templates and data YAML. +The YAML must be located in the input directory. Any file with `.yaml` extension +will be processed. + ```bash -bob html generate --input ./output/ --output ./output/ +bob html generate --input ./input/ --output ./output/ +``` + + +The yaml looks like: + +```yaml +test1.html: + export: en/test1.html + lang: en + title: TEST + meta: + author: schukai GmbH + description: + images: + - id: tickyesdata-image-gi-4013311193 + source: |- + data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm + V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ + PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7 + alt: tick + title: "yes" + anchors: + - id: test-link-test-html + href: /test.html + hreflang: "" + title: test-link + - id: yes-a-html + href: /a.html + hreflang: "" + title: "Yes" + text: + - text: The request was incorrect, the server could not process it. + id: the-request-was-inco-2640993422 + - text: |- + If you received this message as a result of a request to the server API, then check the structure + against the documentation. + id: if-you-received-this-423958995 + - text: 'You can try the following steps:' + id: you-can-try-the-foll-3363859033 + translations: + - id: translations + type: application/json + translations: + key1: value1 + key2: value2 + key3: + one: value3 + two: value4 + modifications: + remove: + - .example1 + add: + - selector: .example2 + html: <b><span>New Content</span></b> + attributes: + - selector: .example3 + name: data-example + value: example ``` +The translations are set in a json inside a script tag. + +The modifications run last. Here you can remove tags, add inhaklt and set attributes. + + + ##### Sync This will sync HTML nodes from a source to a destination. -- GitLab