Two communities - same accounts


(Michael) #1

Hey there, I used Discourse briefly for another project and am excited to use it on a new project.

I’d like to present the same content to two different communities - technical and non-technical. What’s the simplest thing that could possibly work? SSO or Social Logins would split the content, so wouldn’t work.

It would be great if I could use the same accounts, content, etc. but have these two views show up differently on two different urls: technical.example.com and nontechnical.example.com

On technical.example.com all the technical categories would be at the root, with the nontechnical categories in a “nontechnical” top level category.

E.g. technical.example.org

http
nginx
javascript
nontechnical
- sales
- marketing

And nontechnical.example.org

sales
marketing
technical
- http
- nginx
- javascript

The breadcrumbs and search could be the same on each site. It’s important that the first experience be appropriate to the user’s context.

Is it possible to customize the home page as a plugin?
Maybe I’m making this too hard. I haven’t used Discourse except for really basic things.

Have you solved a similar problem? Any suggestions?

Thank you!

Mike


(Jay Pfaffman) #2

Just have one community and use permissions to give people access to the appropriate categories?


(Michael) #3

Hey @pfaffman that’s a good idea, but I don’t want to limit the search and view, just the first presentation.

At Meta, https://meta.discourse.org is also https://meta.discourse.org/latest

A bit of jquery to forward to a category if the request is for / would work.

technical.example.org/ -> technical.example.org/c/technical
nontechnical.example.org/ -> nontechnical.example.org/c/nontechnical

That doesn’t show the “other side’s” topics well, but that’s fine.

Is there an easy way to monkey patch the default theme with some jQuery?

I see /admin/customize/themes, but no JS… see also


(Michael) #4

LOL. JS can be added in an inline script tag here: /admin/customize/themes/2/common/head_tag/edit

This only runs on page load (not internal navigation) which is nice:

<script>
    if (window.location.href==='https://technical.example.org/') window.location.href="/c/lounge";
</script>