Edit post on website preview in admin

Just an idea that would make it easier for editing posts.

It would be awesome if there was an edit button on the page website preview view in admin.

I would be happy to make a PR.

Has anyone got any thoughts or suggestions on this.

Are you thinking that there’d be a link in the preview page which is accessed through the preview link? If so, that’d be nice. This is possibly something that could be handled through a theme too.

I was thinking when viewing the website using the following link www.example.com/ghost/#/site. Reason that I mentioned it is because sometimes I find myself doing it and then looking for the edit button.

Agree, via theme would be an interesting option too.

I think your best bet in that case would be to configure your theme to handle that for you. You could even inject some JS to make sure it only lets people who’ve been into the Ghost admin see the button (eg: cookie checks)

This is very much something we’d love to have, so if you have a suggestion for how it could be implemented I’m all ears.

However, handling the cross domain aspect of this makes it tricky (Ghost admin and frontend are intended to be run on different domains).

Ghost admin and frontend are intended to be run on different domains

Never knew this! The Digital Ocean build of Ghost has them running on the same domain.

My best guess is that cross domain behaviour could be configured in the webserver by having a redirect at the specific slug that the edit button sends you to.

In that case, strategy would require that fetch or API request to get post title would need to be on the server. Then using current components in admin view the search button could potentially be pre-populated with title as suggestion for person visiting.