Preamble
As I have been setting up and customizing my community’s Discourse instance, I have been looking at ways to harness the incredible power of the platform to increase my own happiness as well as that of my users.
One of the things I would like to do would be to add a custom signature to private messages I send, and “sign” them. I don’t want to use an image; but rather, my name in a Google font.
Getting this working will help me understand how to offer snippets and such to my community for their use while composing posts, so the knowledge is general, even if the question is specific.
My reason for asking the question is that before I spend time creating these blocks for use, I’d like to make sure it’s the best way to go about this. Because if I come up with some clever ideas, I’m thinking of sharing some examples to start a discussion so I can glean even more clever ideas from others smarter than me.
The Question: How to put text in a post into a block that can be targeted via CSS?
What I found so far
I ran across the following topic:
[ Custom css inside a post / adding custom classes](Custom css inside a post / adding custom classes)
From that topic, I gleaned this answer:
This does appear to work, but I’m curious to know if it is currently considered the best practice/method for this.
While I’m here, a specific question slightly off-topic while being on-topic:
I’m “abusing” a customization to make my signature idea work, only it’s not working, and I’m curious if anyone has any insight offhand.
I am loading custom google fonts using a plugin I know works because my entire forum is successfully using those fonts. I used that to force-load “Playwrite USA Traditional”.
I have the following CSS in my theme:
div[data-theme-ieh] {
font-family: "Playwrite USA Traditional";
text-align: right;
}
My div in my sample post is indeed right-aligned, but it is using Arial or similar, not my theme’s font, nor Playwrite.
Am I missing something stupid in my setup, or is there something else you can think of I’m missing? This is not a Discourse question.
Also, is there a better way to load a Google font for use in my site?