From 8a141760adeb490c18d3ced90e24a50896565223 Mon Sep 17 00:00:00 2001 From: aka <125674614+zhen-shi@users.noreply.github.com> Date: Sun, 15 Oct 2023 00:39:04 +0800 Subject: [PATCH] feat: show articles word count --- assets/icons/pen.svg | 7 +++++++ assets/jsconfig.json | 18 ++++++++---------- .../partials/article/components/details.html | 10 ++++++++++ 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 assets/icons/pen.svg diff --git a/assets/icons/pen.svg b/assets/icons/pen.svg new file mode 100644 index 0000000..b702048 --- /dev/null +++ b/assets/icons/pen.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/assets/jsconfig.json b/assets/jsconfig.json index 040177a..377218c 100644 --- a/assets/jsconfig.json +++ b/assets/jsconfig.json @@ -1,12 +1,10 @@ { - "compilerOptions": { - "baseUrl": ".", - "paths": { - "*": [ - "*" - ] - }, - "lib": ["es2020", "dom"], - "jsx": "preserve" - } + "compilerOptions": { + "baseUrl": ".", + "paths": { + "*": [ + "*" + ] + } + } } \ No newline at end of file diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index cc0a0fc..b58947e 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -25,6 +25,7 @@ {{ $showReadingTime := .Params.readingTime | default (.Site.Params.article.readingTime) }} {{ $showDate := not .Date.IsZero }} + {{ $showWordCount := .WordCount }} {{ $showFooter := or $showDate $showReadingTime }} {{ if $showFooter }}