Change homepage to tag?

We run a graphics/design oriented community on BlenderArtists.org. One thing that’s been in the back of my mind is that we should have graphics on our homepage to better engage our audience, and not rows of text. The issue with that has always been the discoverability of the other, non-art related categories.

Now that we have the new sidebar in place, I think that issue may have been solved and I’d like to start testing the impact of changing our homepage to our ‘Featured Art’ gallery, which is just a tag: Topics tagged featured . Is there a way to switch our homepage to that URL instead of the usual categories/latest view?

My dev skills are fledgling, but I think you can do it by adding a theme component with this in the header:

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

(Adapted from How to make Docs page the default homepage - #2 by keegan :slight_smile:)

2 Likes

I think that’ll do it, but Custom Homepage for Groups would do it if you want a plug and play option. (It’s rare that I create a useful theme component, so I’m always surprised when this one comes in handy)

3 Likes

Hmm, it works, but not entirely:

  1. When visiting https://blenderartists.org the topics selector correctly displays the featured tag, however the displayed topics are not featured.

image

  1. After this, clicking on the ‘BlenderArtists.org’ logo in the top-left changes nothing in these settings, but the topics update to correctly show only featured topics.

Any idea why?

1 Like

Yeah. I forgot about that. You need to invalidate the preload store and have it loose the right topics. There’s an example in my theme component.

2 Likes

Ah perhaps I should try your TC then :slight_smile: Does it only work on groups, or can I set up a default homepage for everybody too?

1 Like

Ah, that’s a shame. I thought I’d done a clever. :slight_smile:

2 Likes

It was clever! I was elated when I figured out how to do that.it used to work, or works in most conditions? And then I took two days trying to solve the preloadStore issue.

Yes, @bartv, if memory serves, you can set a default and I think even a different default for mobile (?!) .

2 Likes