Defining links in a category where we can configure URL as parameter/config

If I insert via the API a URL into a Category description such as [http:something1/project… ] but in the future I might want [http:something2/project… ] , that is that the referencing url could change or not be the same in future environments, is there a config or option in Discourse to make links more like [{base_url}/project…], like a way to configure base_url as an environment variable that is replaced in all URLs?

I think you can do it with a theme component. There are some examples of how to replace text with a theme component. It would do it in all posts, not just category descriptions, but that’d probably be OK.

EDIT: Actually /admin/logs/watched_words/action/censor might do the job for you. You can have a word replaced with another one. I think that it’d work in your links, but haven’t tested it.

@pfaffman that is very interesting so for example I could have project_url in say [project_url/home_page/…] replaced to www.projects1 I’ll give it a shot and see if word replacement woerks in [urls][descriptions] or maybe there is another way of defining URLs, just going by base Meta Description format.

1 Like