Discourse Post Abbreviations

(Daniel Marquard) #1

Discourse Post Abbreviations

This plugin for Discourse wraps <abbr> HTML tags around a curated list of well known acronyms and abbreviations in posts, improving UX and SEO.


See it in action and test it out for yourself on our Crit Cola’s Discourse.


Add the plugin’s repository URL to your container’s app.yml file, for example:

    - exec:
        cd: $home/plugins
          - mkdir -p plugins
          - git clone https://github.com/critcola/discourse-post-abbreviations.git

Rebuild the container:

cd /var/discourse
./launcher rebuild app

For the plugin to apply retroactively, you’ll need to rebake old posts:

cd /var/discourse
./launcher enter app
rake posts:rebake


The Discourse Post Abbreviations plugin is released under the MIT License.

(David Taylor) #2

How does this differ from this plugin?

(Daniel Marquard) #3

Mine is a curated list. Rather than everyone having to individually add hundreds of abbreviations and their variations, the community can contribute to a single, collective list of them.

(Christoph) #4

But there is no easy way of providing that list list, right? I see it in the code on github, but how do I customize it?

(Daniel Marquard) #5

You can customize it by forking the repository, then copying and pasting one of the lines (I have them in alphabetical order), substituting information in the regular expression where appropriate. If the acronyms could be useful to others, you can submit a pull request and I will merge your changes into the plugin’s repository.

If you need guidance on an example acronym, let me know and I can provide you with the code.

(Elive Linux) #6

Is this plugin still working?

(Christoph) #7

I’m not sure, but this does the job: