mozilla / science.mozilla.org

Making research collaborative, accessible, and usable
https://science.mozilla.org
Mozilla Public License 2.0
45 stars 49 forks source link

Enable blog preview #554

Open alanmoo opened 7 years ago

alanmoo commented 7 years ago

When editing blog entries, wordpress offers a preview button. Right now that links to the science site correctly, with some custom URL parameters that refer to a temporary post. We should be able to extract those params and show a preview of the post.

alanmoo commented 7 years ago

This is probably going to require some sort of authentication layer with WordPress, since draft posts/previews can only be accessed by authenticated users. It might be rather involved.

arush0311 commented 7 years ago

I might be wrong put what about whenever we want to preview a post we publish it under draft category? The second thing would be to not pull anything from the draft category for normal users.

alanmoo commented 7 years ago

As I mentioned in my previous comment, that is a possible approach, but due to cookies and the different domains we're using, it's not possible currently. If we moved wordpress to a subdomain, it may be but we haven't fully investigated that yet.

arush0311 commented 7 years ago

No I mean literally publish those posts in a self made category draft

alanmoo commented 7 years ago

Oh, that's an interesting approach. But does that mean that technically the posts would be public at some URL (even if it's not one that the front end gives out to regular users)?

arush0311 commented 7 years ago

yes, that would be the drawback. But it can be a temporary solution

alanmoo commented 7 years ago

Would we be able to prevent those pages from being seen by search engines?

Full disclosure, I'm not entirely positive this is a useful way to spend time given some other CMS works we're doing at the moment; we may change from Wordpress entirely.

arush0311 commented 7 years ago

I don't think search engines can see any blogs due to its dynamic nature. But yes we can add a sitemap if that's what you are asking.

Even If we change to other cms this will still persist right? Or do we want to integrate cms with science website?

alanmoo commented 7 years ago

We're looking at using Mezzanine for other projects, which would potentially integrate much more nicely with the science site if we moved it. That's a big "if" though, as I believe this site has other priorities. I'm currently trying to find out from stakeholders what the priorities are.