question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preview link to draft post

See original GitHub issue

Ghost makes it extremely easy to preview markdown in real time, but what if we want more than that? For example, a user might want to add Mathjax support in the website and want to see the LaTeX code rendered on the preview pane as they are typing. This is currently not supported because the user needs to fiddle with file such as ghost/core/server/views/default.hbs to make sure Mathjax can be loaded and they can see the preview. This is not practical in all scenarios, for example, some users don’t want to change the existing code in order to get the custom preview working.

So right now, a user has to “preview” the post by publishing it first and by manually loading it in the browser. What I am proposing is, why don’t we add a feature to Ghost that will let the preview to be rendered without publishing the post/page first? So users can preview their post (if they are logged in admin) by going to /preview/{post-slug}. I think that would be nice. WordPress also has this feature and it’s quite nice to have it.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
alexparkercommented, Aug 6, 2014

As a work around for this, I’ve added a condition on my post index in my theme to not render posts that have the tag _preview . That way I can publish it, it wont show up on the listing, and I can share it with anyone I give the url to. It works for now until this is added in.

{{#foreach posts}}
    {{^has tag="_preview"}}
      ... your normal post list item ...
    {{/has}}
{{/foreach}}
0reactions
elijahpaulcommented, Mar 10, 2015

@alexparker : Works great, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Share A Draft WordPress Post/Page - ThriveWP
The first step towards sharing a draft in WordPress is installing and activating the Public Post Preview Plugin. Proceed to the post or...
Read more >
How To Selectively Share a Draft in WordPress - WPShout
Install the “Public Post Preview” plugin. Then activate it. Go to the post (of whichever post type) that you want to share. Open...
Read more >
How to Allow Public Post Preview of Unpublished Posts in ...
After enabling the public preview, you need to click on the save draft button to save your changes. Next, you can copy the...
Read more >
How to share WordPress Draft Post with someone without ...
A Preview Link will appear that you can share publicly with anyone without actually publishing the Draft Post.
Read more >
Public Post Preview – WordPress plugin
Description. Share a link to anonymous users to preview a draft of a post (or any other public post type) before it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found