Discourse Post Abbreviations

AI-generated summary

The Discourse Post Abbreviations plugin, created by DanielMarquard, automatically wraps <abbr> HTML tags around a curated list of common acronyms in Discourse posts to improve UX and SEO. It can be installed via app.yml and requires rebuilding the container and rebaking posts for retroactive application. david asked how it differs from another plugin, to which DanielMarquard clarified that his plugin uses a community-curated list rather than requiring individual setup. tophee questioned how to customize the list; DanielMarquard explained users can fork the repo, edit the regex-based acronym definitions, and submit pull requests for community inclusion. Thanatermesis asked if the plugin still works, and tophee suggested an alternative plugin that may serve the same purpose. The plugin is tagged as deprecated, suggesting it may no longer be actively maintained.

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