ProCourse Static Pages


(Joe Buhlig) #1

I’ve been doing freelance Discourse customization as my primary gig for almost a year at this point. And one of the most common questions I get is about static pages. “Can I just create a static sales page?” “Where’s a good place to put a FAQ without a discussion around it?”

You can likely argue the validity of these questions in most scenarios. The main response being “just close the topic.” But that doesn’t cut it for most. Thus, I decided to create this plugin to make it possible.

It’s pretty simple. You get a backend under Admin > Plugins to create, edit, and delete these pages as you like. It uses the same topic composer we’re used to. Once you have the page built, you can Enable it and share the link to the page wherever you like.

For a demo: https://talk.procourse.co/static-page

I should also note that styling is made easier with a class static-page in the wrapping div for the whole page. That way you can do whatever you want to the body of the page from a CSS standpoint in a theme.


Custom Homepage Plugin (dl-custom-homepage)
Easy to use static pages plugin
Creating a new path (url) with static data
Create a custom page
Advertise activity in a private category (discourse-category-lockdown)
Easy to use static pages plugin
Feature request: Permalinks like TOS to function as static pages
Static pages plugin
Help! I need to contact discourse support team for corporation!
Employee Portal "Non-Forum" Pages
Alternatives or ETA for static pages
[Paid] Create a way to link to multiple select categories (create archive plugin)
List and explain Discourse specific features to new users?
404 rendering at custom route without redirection
/about page add a new link and menu
Static Pages Plugin - Meta description the plugin?
Static Pages Plugin - Meta description the plugin?
How to place a folder with html files on a discourse setup?
What plugins do you use - and why?
Building New Topic Lists
How do I create static pages on my site
How do I create static pages on my site
#2

I’ve installed it! Not sure if I saw that you could do this (or not)… but easy to add custom embeds (like google maps etc)? Didn’t appear easy to do via the WYSIWYG…?


(Joe Buhlig) #3

It follows the same rules as applied to creating a new topic currently. So any embeds you allow via iframe in your settings will be respected.

That said, I like the idea of allowing html on the backend for this.


#4

hmm. it doesn’t render. like a basic youtube embed.


(Joe Buhlig) #5

This is easily the biggest request I’ve had for the Static Pages plugin:

There is now a checkbox on each page to switch from using the composer to adding raw code for the content.

It uses the same ace-editor we use when building themes. So it should feel very familiar.


(Chris Croome) #6

Would it be possible to use this plugin to create pages that are readable by the public, without a login, on Discourse sites that are set to be private?

In the same way that the terms of service and privacy policy are?

I have found that by default the static page plugin URLs redirect to the /login page on sites that are private.


#7

Having some issues… checking the html box makes this disappear:


(Joe Buhlig) #8

Are you getting anything in the error logs on this one? Or even in the console? I’m not finding any issues with it on my end.

I know. I know. Typical developer response. :wink:


#9

Would it be possible to share files via a static page, e.g. Word, PDF or JPEG files?


(Joe Buhlig) #10

It uses the same composer as we use for new topics and posts. So if you can post it there, you can post it in a static page.


#11

Good to know! That might be a better way to share documents that are being updated from time to time.


(Xavier Bergeron) #13

I had the same issue so I had a quick look and it seems the ACE editor has 0 height!


(Joe Buhlig) #14

I just pushed a big update to this plugin with the following changes:

  1. It’s been renamed to ProCourse Static Pages. I’m slowly deprecating the Discourse League naming in favor of ProCourse.

  2. The license key process has been removed. It’s now completely free. :wink:

  3. The issues with the ACE editor should be resolved as well.

  4. There is a background job that runs once automatically to copy over any legacy pages you may have had in the old version. So you should be set to simply upgrade. :+1:


(Kris) #15

Just tried this out and get 404s when I try to view the page(s) I created, any thoughts as to why?


(Joe Buhlig) #16

There’s a button under the page title for Enable/Disable. Do you have it Enabled?


(Kris) #17

Hah, wow. :man_facepalming: that was totally it.


(Joe Buhlig) #18

It’s set up that way so you can build the page without it being public. :wink:


#19

Nice you did open it for everyone.

There are some possibilities that opens here for me:

  • group based view permissions
  • something like a “template system”, right now i need to put the same html around all my static pages to fit my themen / layout.
  • some kind of automatic sidebar / navigation generation