# Word Cloud plugin

**URL:** https://meta.discourse.org/t/word-cloud-plugin/210169
**Category:** Plugin
**Created:** [November 25, 2021, 6:08pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169 "2021-11-25T18:08:52Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 6:08pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/1 "2021-11-25T18:08:52Z")

</div>

**Summary** : A Word Cloud that abstractly summarises the content of your site.

[![](https://global.discourse-cdn.com/meta/optimized/3X/1/4/1443e6f47cf93767af96cf72a07ab12a0d2f08f6_2_690x365.png) ](https://global.discourse-cdn.com/meta/optimized/3X/1/4/1443e6f47cf93767af96cf72a07ab12a0d2f08f6_2_690x365.png)

🔗 **GitHub** : `https://github.com/merefield/discourse-word-cloud` [Word Cloud Plugin](https://github.com/merefield/discourse-word-cloud)

➡ **Install** : Follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157).

### Features

Represents the posts of your community as a Word Cloud summary. The words are animated and if clicked will perform a simple word search.

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/e/2eb0a277ab9565d6d72dc37d8d4c934ed7e09e99.png)

Get to it by hitting `Word Cloud` on the Hamburger menu or navigating to `yoursite.com/word_cloud` - NB you have to be logged in as a registered user to see it and it’s only on desktop.

To refresh data, Trigger the job:

[![](https://global.discourse-cdn.com/meta/optimized/3X/1/7/17a59808caba348fdf1b03333da2b98ad561293c_2_690x90.png) ](https://global.discourse-cdn.com/meta/optimized/3X/1/7/17a59808caba348fdf1b03333da2b98ad561293c_2_690x90.png)

Otherwise this runs every hour.

### Interested in the data?

My intention was just to paint a picture.

If you want to see the data, just go to `yoursite.com/wordcloud.json`

### Configuration

Settings … so … many … settings:

- Restrict to specific Categories:

[![](https://global.discourse-cdn.com/meta/original/3X/f/6/f67caecb3788adbf5df18bff1a117517a09740e3.png) ](https://global.discourse-cdn.com/meta/original/3X/f/6/f67caecb3788adbf5df18bff1a117517a09740e3.png)

- Word Cloud Ignore List (300 words by default, using a list I found [here](https://www.lakeshorelearning.com/assets/media/images/pdfs/SightWord_List_1-300.pdf)):

[![](https://global.discourse-cdn.com/meta/optimized/3X/1/6/16c991ce611d58f5e087b22fcdd8273396413313_2_690x449.png) ](https://global.discourse-cdn.com/meta/optimized/3X/1/6/16c991ce611d58f5e087b22fcdd8273396413313_2_690x449.png)

NB Word stats are updated every hour now (which is probably still excessive, but for the time being makes it easier to checkout changes in Production as we go through a lot of initial code evolution).

NB#2 I’ve not yet considered other languages here beyond English (it’s certainly not tested). The current word manipulation may not work well in some languages. Suggestions & PR’s welcome.

If you select no Category (default) you get a scan of all forum Posts (PMs and all). If you add just one Category, word stats are restricted to that etc.

### Known issues

- Currently doesn’t support Safari. [This issue](https://github.com/merefield/discourse-word-cloud/issues/2) was introduced once I added responsiveness. I’m very busy these days, so if you can find a solution PR Accepted.

### TODO

- It may not support other languages. I’ve only tested English. PR Welcome.
- The menu item has localisation support, but if no-one has yet PR’d your localisation yet, please consider doing so or otherwise it will remain a key code …
- Add option to have it appear on the front screen above Topic Lists (much like the Discourse Tag Cloud Theme Component). PR Accepted.

## Creds

- The visualisation is based on [the awesome d3 library](https://d3js.org/)

- The work was inspired and guided by the feedback of the great people in this Topic: [Word cloud plugin for discourse?](https://meta.discourse.org/t/word-cloud-plugin-for-discourse/181161)

- thanks to @silvacarl for the suggestion and @tobiaseigen for all the useful feedback.

## Similar projects

If you like this you might also like my:

- [user network visualisation](https://meta.discourse.org/t/community-network-visualisation/184189)
- [Discourse Tag Cloud](https://meta.discourse.org/t/discourse-tag-cloud/218014)

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [November 25, 2021, 6:13pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/2 "2021-11-25T18:13:48Z")

</div>

OMG I was _literally_ just thinking about this. Magic Thanksgiving psychic powers!

What about an option to make the tag cloud based on tags rather than post text?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 6:15pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/3 "2021-11-25T18:15:03Z")

</div>

Your wish is my command 🧙 There’s just no formal Topic for it yet: [GitHub - merefield/discourse-tc-tag-cloud: A Discourse Theme Component that displays a tag cloud above the tag lists on the tags page · GitHub](https://github.com/merefield/discourse-tc-tag-cloud) 🎉 (which as a TC is even simpler to install).

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [November 25, 2021, 6:26pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/4 "2021-11-25T18:26:52Z")

</div>

Oooh!

Hmmm. I installed the TC and enabled it in my theme, but it doesn’t seem to be doing anything on [https://ask.fedoraproject.org/tags](https://ask.fedoraproject.org/tags)…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 6:34pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/5 "2021-11-25T18:34:19Z")

</div>

It’s FYI desktop/tablet only.

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [November 25, 2021, 6:39pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/6 "2021-11-25T18:39:59Z")

</div>

Yeah, I’m using Firefox… same in Chrome?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 6:42pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/7 "2021-11-25T18:42:04Z")

</div>

Looks like you have a set of script permissions violations in your console. You need to give your site the right to run these scripts. Look at `content security policy script src`.

See: [Mitigate XSS Attacks with Content Security Policy](https://meta.discourse.org/t/mitigate-xss-attacks-with-content-security-policy/104243)

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [November 25, 2021, 6:49pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/8 "2021-11-25T18:49:40Z")

</div>

Awesome, thanks for the quick tech support. 🙂

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 25, 2021, 9:09pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/9 "2021-11-25T21:09:51Z")

</div>

It understads only alphabets a..z and just drops out like scandinavian åäö.

And the hamburger menu link is funny [fi.word.cloud.hamburg… 😉

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 9:12pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/10 "2021-11-25T21:12:12Z")

</div>

That’s possible. I’ve only tested English. I made this clear in the original topic. PR welcome.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 25, 2021, 9:15pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/11 "2021-11-25T21:15:05Z")

</div>

Yes you did. I missed it. Well, I unistall it then (and I have no idea what is PR because I don’t use git 🙃 )

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 25, 2021, 9:15pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/12 "2021-11-25T21:15:45Z")

</div>

> [@Jagster](#):
>
> And the hamburger menu link is funny [fi.word.cloud.hamburg… 😉

You will need to PR. There’s localisation support for the menu item, but users will need to PR additional languages.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 17, 2022, 9:31pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/13 "2022-02-17T21:31:14Z")

</div>

This is now responsive to width: [IMPROVE: make the word cloud responsive! · merefield/discourse-word-cloud@b039372 (github.com)](https://github.com/merefield/discourse-word-cloud/commit/b039372eb90135265abfd45e7048c5decc84b66a)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 18, 2022, 10:33am UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/14 "2022-02-18T10:33:50Z")

</div>

You can now modify the Word Cloud dimensions. This will help to include more words.

I recommend leaving width and increasing the height if you so wish:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/9/f99b933b2b94309886277be83610847b8911b3b7.png)

[FEATURE: add ability to change Word Cloud size · merefield/discourse-word-cloud@376ee26 (github.com)](https://github.com/merefield/discourse-word-cloud/commit/376ee26fb1fa2f19cea1d3e1b71c6cd21d03eb92)

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [May 3, 2022, 2:27am UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/15 "2022-05-03T02:27:19Z")

</div>

## Is word cloud the same one for all, or one for each?

You see we have locker mechanism, to set users only have some regions but not all categaries, when searching, it also suits only for that one account’s available posts.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 3, 2022, 6:02am UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/16 "2022-05-03T06:02:43Z")

</div>

Same for all. To tailor the output would require a lot more server resources so I haven’t gone down that road. Also it needs a sufficiently large dataset to make sense so creating one for small sets of words might not lead to very interesting results.

The word cloud is so abstract I’m not sure it matters if some categories are locked. However on some communities it could be an issue depending on the content. The search results from clicking a word will only return Topics to which you have access of course.

You can always exclude sensitive Categories.

PRs always considered.

---

<div class="post-metadata">

### Author: ![pluisr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pluisr/32/126064_2.png) [@pluisr](https://meta.discourse.org/u/pluisr)
#### Post date: [June 2, 2022, 5:02pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/18 "2022-06-02T17:02:21Z")

</div>

Thank you @merefield for this plug-in, very helpful in our team instance.

Is there a setting or a way to place the word cloud at the header of the main page of our discourse?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 2, 2022, 5:03pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/19 "2022-06-02T17:03:45Z")

</div>

No there is not. PR accepted.

One potential blocker is the lack of support for Safari at this stage. Someone might like to help out there.

Note that the slightly more practical Discourse Tag Cloud theme component (linked in the OP) does.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2024, 7:29am UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/20 "2024-03-19T07:29:18Z")

</div>

This is back from the dead, now working in Ember 5 and includes a new setting that adds a menu item to the Sidebar/Dropdown which you can switch off.

---

<div class="post-metadata">

### Author: ![sasha\_ilinsky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sasha_ilinsky/32/435095_2.png) [@sasha\_ilinsky](https://meta.discourse.org/u/sasha_ilinsky)
#### Post date: [March 26, 2024, 7:16pm UTC](https://meta.discourse.org/t/word-cloud-plugin/210169/21 "2024-03-26T19:16:17Z")

</div>

It’s cool. Can you imagine if this were combined with the profile cover? Generate from user’s posts to user’s profile cover.

[Next page](https://meta.discourse.org/t/word-cloud-plugin/210169.md?page=2)
