Best way to make the /news directory the home page?

I am using the news plugin by Pavillion on my new forum-centric website.

I’m implementing it similar to the way its implemented here:
https://www.elektronauts.com/news

But I was wondering what people here feel is the best way to implement the redirect to the /news directory?

Is it a 301 redirect? Or something else? Are there tradeoffs? Any help greatly appreciated.

2 Likes

Did you give this a try? Custom Homepage for Groups

3 Likes

Is there a way to make Custom Homepage for Groups work for non logged in users or users of any group? I.E. a default alternative home page for those who are not specified otherwise?

2 Likes

I’m not very familiar with the news plugin, but it looks like it adds a new route at /news

So, you can use something like this in the header tab of your theme to make that route the default homepage for all users.

<script type="text/discourse-plugin" version="0.8">
  const { setDefaultHomepage } = require('discourse/lib/utilities');
  setDefaultHomepage("news");
</script>
6 Likes

Hi Jay. I’ve loaded your Custom Homepage for groups and it looks good.

One thing we don’t understand from the explanation of the theme component… does it support anonymous / non-logged in users?

Can we identify this null group and direct them to a given path?

It doesn’t seem like we can from the little documentation associated with the plugin, but I may be misreading it.

Any help greatly appreciated.

2 Likes

I think that you can use the group everyone, which includes anonymity users, but I haven’t tried. The above post looks like it’ll work and is pretty simple.