Page Publishing

That would be great.

1 Like

So it’s currently impossible to have responsive published pages, and this site particularly wants

  1. images made available when sharing to public media, and
  2. responsive/resizing images displayed, especially on mobile–oh, mobile could just resize the image with CSS–that should work, right?

+1 for having the Discourse header in published pages. I’m missing my website logo, custom header links and beloved hamburger menu :slight_smile:

Another oddity: in posts, my lightboxed images open in a nice popup, whereas in published pages, they open in a new tab…


I think what’s needed is a set of theme components that add such. The last client I had to use this wanted the topic creator removed. I think it’s hard to guess what will meet people’s needs for this!


Are there currently any ongoing efforts for adding “simple” (non-API) Javascript support to published pages? Or should we forget about this near- to mid-term ?


Can i display external non-Discourse JSON on this page? Because we can’t use php code here and discourse strip most of html so i do not know how to do it…


I have a problem with a published page - the button to copy the content of the code block is not visible on a published page. Screenshot: Screenshot by Lightshot. I move the mouse over the block, but the button doesn’t appear. When logged in - everything works as usual - ok.

Can anybody repeat the problem? Any solution?


Thank you @riking !

It indeed seems that “regular” text/javascript is executing on published pages when it’s in the header or footer of a theme component.


Ha! So it seems that there’s a hacky way to make some theme components work with page publishing.

I’m looking into adding some header/footer to the published pages, and theme components seem to be the way to go. But it seems bad to go on and implement something that would potentially break in the near future.

@riking, it looks like the text/javacript type in header or footer working on published pages was unintented. Is it going to be fixed or used to extend published pages?

@syl, author of DiscPage, mentioned the possibility to re-implement the DiscPage plugin using Page Publishing functionality. Do you still have this in mind, @syl? What do you think would be the path of least resistance to integrate both functionality @riking?


Unfortunately, the “Page Publishing” feature doesn’t meet my needs. For me to use it, I would need published pages:

  1. to be displayed within the normal Discourse layout, i.e. with the standard Discourse header (just like the Terms of Service and the Privacy Policy), and
  2. to be rendered like normal (decorated) topics, i.e. supporting bbcode and plugins.

In the meantime I used the default Discourse customization facility:

  1. Identify the added element, e.g., with a published-page-footer-links CSS class.
  2. Customize CSS to hide this element by default and show it only for published pages
  3. Add the element in the Footer space

2. In CSS, add:

/* Only show footer links on published pages */
.published-page-footer-links { display: none; }
.published-page .published-page-footer-links { display: block;}

3. in Footer, add:

<nav class="published-page-footer-links">
Hi there! This is the footer for published pages!

I would like to replace procourse-static-pages with “page publishing”. Is it somehow possible to add the default discourse header to “published page”? I mean, show the logo on the left side, the search, hamburger icon, avatar and the related functionality for theses buttons on the right side. Then it would be a replacement of procourse-static-pages.

Additionally, it would be great to use DiscoTOC for the published page, too.


Thanks a lot for this feature! It allows to build great landing pages apart from the homepage. So it would be nice to have the appropriate metadata that you need for sharing on social media, SEO or Google Discover (the latter apparently became more important than Google search in my country during the last months when it comes to traffic). Are there any plans to provide a meta title / description and the custom meta tags for the big social networks or even make them editable?


Any update on being able to include the Discourse header on published pages?


Will it ever be possible to render LaTeX in a published page? Would be cool to write math articles.


May I ask, Is there a url that can list all the published page for Admin ? So Admin can easily see all the page they published.
Something similar to wordpress ?
If not, It would be great if the url list all the page published.


Are there any plans to allow rendering of these published pages inside the normal Discourse Ember layout? It seems a shame that you can’t just pull them into the layout like the other app sections. I’ve seen a number of others ask this in this thread but nobody seems to have given a direct answer yet.

All of the other static pages plugins that I’ve seen in my research seem to be also rendering their static content in their own Rails layouts, too. Is this a limitation of the Discourse platform, or just that nobody has coded it in yet?

If there is no hard limitation against rendering the published pages inside the normal app layout (with header), where should I start when it comes to getting this feature moving?

Thank you :smiley:


You can alter styling per the original post: Page Publishing


Thank you @hellekin. However, this does not address the main point of my reply. I asked if it’s possible to render the published pages within the normal Ember.js app layout (with the logo, search, hamburger nav, and user nav), not how to customize the separate published pages layout.

I want the static content to render within the normal app layout the same way that a category or topic detail page would load. I would like to use of all the existing plugins and theme components that interface with the main Ember app layout.


I think the purpose of published pages is to remove the Discourse UI.

Although I agree that it would be great to have some features (e.g., from theme components or plugins), I think linking to topics would work better in your case. Maybe you want to explore styling closed topics instead?