Discourse Post Abbreviations

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.

Demo

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

Installation

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

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - 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

License

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

5 Likes

How does this differ from this plugin?

1 Like

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.

3 Likes

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?

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.

2 Likes

Is this plugin still working?

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

3 Likes