From af6a4a075deeb7d406c688ed2c772ed13a9fb3a7 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 28 Feb 2023 11:11:18 +0100 Subject: [PATCH] move petite-vue-related shortcodes to pv directory; start input-..., display --- assets/js/tsconfig.json | 1 + exampleSite/config.yaml | 12 ++++++++++- exampleSite/content/_index.md | 8 ++++---- exampleSite/content/app/test1.md | 20 +++++++++++++++++++ .../{pv-count.html => pv/count.html} | 0 layouts/shortcodes/pv/display.html | 12 +++++++++++ .../{input.html => pv/explore.html} | 0 layouts/shortcodes/pv/input-textline.html | 7 +++++++ 8 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 exampleSite/content/app/test1.md rename layouts/shortcodes/{pv-count.html => pv/count.html} (100%) create mode 100644 layouts/shortcodes/pv/display.html rename layouts/shortcodes/{input.html => pv/explore.html} (100%) create mode 100644 layouts/shortcodes/pv/input-textline.html diff --git a/assets/js/tsconfig.json b/assets/js/tsconfig.json index b04e147..303d08c 100644 --- a/assets/js/tsconfig.json +++ b/assets/js/tsconfig.json @@ -5,6 +5,7 @@ "compilerOptions": { "noEmit": true, "module": "es2022", + "moduleResolution": "node", "lib": ["es2017", "dom"], "paths": { "@params": ["./params-tsc.ts"] diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 84d7df7..0ad99d8 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -25,12 +25,22 @@ taxonomies: domain: domains topic: topics +frontmatter: + _merge: shallow + +related: + _merge: shallow + +taxonomies: + domain: domains + topic: topics + menu: main: - identifier: home name: Home title: Home - url: /posts + url: /app weight: 10 - identifier: topics name: Topics diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 70d1cff..01e044d 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -14,10 +14,10 @@ jsModule: main.ts cyberscopes example site - use petite-vue in Hugo-generated sites. -{{< pv-count >}} +{{< pv/count >}} -{{< pv-count init="7" expr="count--" label="dec" >}} +{{< pv/count init="7" expr="count--" label="dec" >}} -{{< pv-count init="99" expr="save()" label="log" >}} +{{< pv/count init="99" expr="save()" label="log" >}} -{{< input >}} +{{< pv/explore >}} diff --git a/exampleSite/content/app/test1.md b/exampleSite/content/app/test1.md new file mode 100644 index 0000000..ba93480 --- /dev/null +++ b/exampleSite/content/app/test1.md @@ -0,0 +1,20 @@ +--- +title: "example" +summary: "" +img: +pageid: test1 +domains: [] +topics: [] +date: 2023-02-28 +author: helmutm +draft: false +weight: 10 +jsModule: main.ts +--- + +cyberscopes example site - use petite-vue in Hugo-generated sites. + +{{< pv/input-textline name="firstname" >}} +{{< pv/input-textline name="lastname" >}} + +{{< pv/display name="firstname" >}} diff --git a/layouts/shortcodes/pv-count.html b/layouts/shortcodes/pv/count.html similarity index 100% rename from layouts/shortcodes/pv-count.html rename to layouts/shortcodes/pv/count.html diff --git a/layouts/shortcodes/pv/display.html b/layouts/shortcodes/pv/display.html new file mode 100644 index 0000000..da508a5 --- /dev/null +++ b/layouts/shortcodes/pv/display.html @@ -0,0 +1,12 @@ +
+

+
+ +
+

+
+ +
+
id = {| conf.itemid |}
+
+ diff --git a/layouts/shortcodes/input.html b/layouts/shortcodes/pv/explore.html similarity index 100% rename from layouts/shortcodes/input.html rename to layouts/shortcodes/pv/explore.html diff --git a/layouts/shortcodes/pv/input-textline.html b/layouts/shortcodes/pv/input-textline.html new file mode 100644 index 0000000..0fa3cf5 --- /dev/null +++ b/layouts/shortcodes/pv/input-textline.html @@ -0,0 +1,7 @@ +{{- $name := default "textline" (.Get "name") }} +
+ +