mattmilburn/strapi-plugin-preview-button

no preview button and only showing live button

Closed this issue · 2 comments

here is my code

'preview-button': {
    config: {
      enabled: true,
      // injectListViewColumn: false,
      contentTypes: [
        {
          uid: 'api::home.home',
          draft: {
            url: 'http://localhost:6001/{locale}/posts/{slug}',
            query: {
              type: 'home',
              locale: '{locale}',
              slug: '{slug}',
            },
          },
          published: {
            url: 'http://localhost:3000',
          },
        },
        {
          uid: 'api::post.post',
          draft: {
            url: 'http://localhost:6001/{locale}/posts/{slug}',
            query: {
              type: 'post',
              locale: '{locale}',
              slug: '{slug}',
            },
          },
          published: {
            url: 'http://localhost:6001/{locale}/posts/{slug}',
            copy: true,
          },
        },
      ],
    },
  },

but i'm not able to see any draft (preview. button) but it's only showing copylink and live button. Is there anything i'm missing now?

Hi @sr1k3sh Your plugin config looks okay to me. Do you have draftAndPublish enabled for both content types? Also keep in mind if the home page or a post is already in published mode, you won't see the preview buttons, just the live buttons.

Curious if you were expecting to see both preview and live buttons display next to each other? This was actually requested in another issue and should be available in a future release.

Closing due to inactivity