Page Publishing

What permissions are applied to unlisted topics? ‘everyone’, I’m guessing - useful for a public site but not invite-only sadly.

I think that what those of us running invite-only forums want for published topics to have a setting to allow them to be publicly viewable regardless of permissions on the post it is based upon, so that they behave the same way as the Privacy and TOS pages. And whilst at it, being able to make the FAQ and about pages also publicly viewable if we wish.

4 Likes

Yes, my site is required login, but some topics we want to display for the non-registered users.

Anyway there’s always topics suitable for non-registered users.

4 Likes

Great addition, thank you for this @chau! :ok_hand:

Am I missing something, or is there no way to include the site header and site footer? Ie publish the page as a part of the discourse site w/o the ability to post replies etc.? Like static pages basically?

3 Likes

Not missing anything, there isn’t a way to add footers/headers just yet! One of the enhancements we received so it’s definitely on the list for the next round of work.

10 Likes

I have this… I started with an invite-only setup, and started to go through all categories, removing everyone from the permissions and replacing with a specific group (you could use trust_level_1 since this group requires to have been logged in). Then I put topics I want public in the Uncategorized space (or you may create a specific category with public permissions). Then I removed the invite-only setting (but kept the registration off by using SSO.)

7 Likes

Hi folks!

Just wanted to update you folks on what we’ve been up to! We have added the ability for Published Pages to be public!
FEATURE: allows published pages to be public by jjaffeux · Pull Request #10053 · discourse/discourse · GitHub

There will now be a site setting: show published pages login required that you can enable to override the login_required setting.

There will also be a checkbox to publish a public page from the Page Publishing window.


This was a really popular request and I’m excited for you all to try this one out. Looking forward to the feedback as well!

29 Likes

This is amazing! I really like it - nice work.

Some minor feedback - perhaps some or all of this could be dealt with using CSS but might be nice to have them as sane defaults:

  • Looks like the title is still not showing in the browser tab?
  • Would be loverly to have DiscoTOC support on published pages.
  • Would prefer to not see the user avatar, username and date on published pages.
    • Or this info is to be diplayed, maybe would work best at the bottom, along with the CC license and url. And if logged in, link back to the topic.
  • The topic title is smaller than the level one title within the post, which is a bit jarring/weird.

This feedback is based on a post from my personal forum where I maintain handy procedures for stuff I have to do periodically and always forget how - see screenshots below. It’s going to be awesome to be able to just send one of my kids one link when they ask me how to do something.


11 Likes

Thrilled about this!

Small note – I think there’s a missing closing </div> for .published-page-header, before .published-page-body.

The spec for the css selector is “the title and authorship information”, but currently it’s modifying the full topic (including the body).

screenshot from firefox

3 Likes

Are we missing a div here @tshenry?

5 Likes

I don’t think it’s missing per se, just misplaced. I’ll create a PR with what I believe was intended and hopefully we can get this fixed in short order!

Edit: PR is merged and backported to stable!

12 Likes

Awesome stuff, and thanks again for listening to your users. I love the ‘lets make this better for us all’ vibe that Discourse has! We’ll make heavy use of this.

When discussing one use (patching up an install that went a bit awry), another user pointed out a remaining bit of icing that could do with going on the cake:

Hey, is there any way to include the ability to make /faq and /about public as well, as they are currently hidden in Login Required sites. We can of course use the existing functionality that you’ve just released for /faq by making our own, changing the link in settings, and explicitly linking to it. However, this is not pretty and the existing navigation to it remains hidden. We can’t do that at all for /about of course.

6 Likes

Something that would go nice with this feature is to make publications onebox-compatible such that people could easily share the content.

12 Likes

I came here to report just this. I think the published page html styling is very sparse, by default. Also missing title in browser tab among other things as I mentioned in my feedback above.

9 Likes

If we are still missing a title we should fix that next week @sam

7 Likes

Just noticing also that dates inserted the discourse way look weird in published pages. So guess… don’t do that?

4 Likes

Please excuse my ignorance, as I am very much a beginner in the HTML/CSS space… however, how would we go about applying our theme colour choices to published pages. At its simplest, I’d like to use the dark background/white text to give the published pages the same darkmode experience as accessing our forums.

Is this already in the product, or do I need to play with HTML/CSS? If the latter, could anyone give me some pointers in the right direction? Thanks!

2 Likes

This should fix it, will merge Monday:

6 Likes

Can you make this a separate feature request please? This is not related to page publishing, as in I wouldn’t have to change anything related to page publishing to make it possible. I do agree it would be better if all these “static” pages could have more or less the same behaviour, but there are multiple solutions here (do nothing? add site settings? migrate these to page publishing?), so we might want to have a dedicated topic for this.

6 Likes

Update

We have added some more styling to the Published Page for a better integration into the Discourse environment. :smile: :discourse:

The html and css referenced in the OP has been updated to reflect this change.

16 Likes

Cool !
But too bad some of those classes were renamed and I don’t really understand why the prefixes differ between the classes now: some of them are now pp- and others are published-page- ?

6 Likes