Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

A Discourse plugin for specialized BBCodes. Made for Doom Emacs' Discourse server.

License

Notifications You must be signed in to change notification settings

doomemacs/discourse-custom-bbcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discourse-custom-bbcodes

Disclaimer: not only am I new to writing discourse plugins, this was written hastily with the intention to polish it later. Use at your own risk!

A Discourse Plugin (built on top of discourse-awesome-bbcodes) that adds custom BBCode tags for Doom Emacs' Discourse. These tags are:

  • [dump]...[/dump] --- Useful for large text dumps that shouldn't be indexed by the search engine. Our github issue tracker had a serious issue with system information polluting the search results.
  • [float=left]...[/float] or [float=right]...[/float] --- used to float content to the left or right.
  • [clear][/clear] --- used to clear floated content.
  • [kbd command=+ivy/switch-workspace-buffer alt="C-x C-b,SPC b B]SPC b b[/kbd] --- syntax sugar for key sequences. Will later be improved to display commands and alternative key sequences on mouseover.
  • [notice]...[/notice] --- creates a notice modal (a blockquote). Uses the first emoji in the first element as the notice's icon, and appends a notice-EMOJINAME class to the enclosing blockquote.
  • [tabs id=ID title=TITLE]...[/tabs] --- Tabbed sections of content. Use [tab=ID]...[/tab] inside.
  • [[...]] syntax for auto-linking:
    • Github issue references: [[#123]], [[doom-emacs/#1234]], [[hlissner/doom-emacs#1234]]
    • Links to Doom module docs or a particular module flag's docs: [[:lang]], [[:lang rust]], [[:lang rust +lsp]]
    • Packages: [[package:evil]], [[p:evil]], [[p:rustic-mode]]
    • Functions/Macros: [[fn:evil-join]], [[fn:after!]], [[fn:add-hook]]
    • Variables: [[var:evil-join]], [[var:after!]], [[var:add-hook]]
    • Faces: [[face:org-level-2]], [[face:font-lock-comment-face]]

Installation

  • Add the plugin's repo url to your container's yml config file
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # ...
          - git clone https://github.com/doomemacs/discourse-custom-bbcodes.git
  • Rebuild the container
cd /var/discourse
git pull
./launcher rebuild app

Credits

About

A Discourse plugin for specialized BBCodes. Made for Doom Emacs' Discourse server.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project