v1.4 now allows the counting to be done on the homepage too!
Use /wordcount. It will then count the number of words below this parent block. This supports an unlimited number of nested blocks.
You can use more than 1 word counter in a single page. Just prefix the blocks you would like to count with another /wordcount.
It also supports counting sentences that have both English and Chinese/ Japanese words. E.g. 敏捷的棕色狐狸跳过了懒狗 is a funny phrase returns 16 words.
You can also use /wordcount char to count the number of characters (including spaces) instead of words.
Happy counting!
You can style the wordcount button using the class .wordcount-btn. Simply add it into your custom.css.
Example:
.wordcount-btn {
border-color: red;
font-size: 2em;
}
Option 1 Install from the Logseq marketplace.
Option 2
Clone the repository.
Run npm i && npm run build and manually load the plugin in Logseq.
Option 3
Download the latest release and after extracting the zip file, manually load the plugin in Logseq.
Please look for me on Discord or open an issue if you have any feedback!
pengx17 for his suggestions and Ken Lee for his word counting algorithm.
