Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be bumped to the latest version of next #21

Closed
wbunting opened this issue Mar 11, 2020 · 2 comments · Fixed by #22
Closed

Should be bumped to the latest version of next #21

wbunting opened this issue Mar 11, 2020 · 2 comments · Fixed by #22

Comments

@wbunting
Copy link
Contributor

Remove the unstable methods + add preview mode.

@ijjk I took a stab at this on a fork:
https://github.com/wbunting/notion-blog

Adds some api routes to enable / disable preview mode as well as adds a banner to show the user that they are in preview and which posts are drafts.

image

If the changes look good to you I can PR on this repo with the patch.

@wbunting
Copy link
Contributor Author

It would also be pretty sick to get this set up with Deploy Hooks. That way if your preview looks good you can click "rebuild SSG" or something to sync up to production

@ijjk
Copy link
Owner

ijjk commented Mar 11, 2020

Hi, the changes on your fork look awesome, I would definitely appreciate a PR with those changes!

A few things I noticed that can be updated:

  • combine api/clear-preview and api/clear-preview-post into a single endpoint and redirect to /blog if no slug query value
  • the exit preview mode button looks like it could use flex-direction: column to make sure the text is centered vertically
  • the fallback state for lazy blog posts isn't currently handled, we'll want to show a loading state when useRouter().isFallback is true

Feel free to open the PR and I can help tweak these things if you'd like, thanks for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants