rohit-gohri / redocusaurus

OpenAPI for Docusaurus with Redoc
https://redocusaurus.vercel.app/
MIT License
629 stars 114 forks source link

"Page not found" shows when loading operationId URL #282

Closed jrub closed 1 year ago

jrub commented 1 year ago

Hi there,

when loading an operationId by URL directly, a "Page Not Found" is shown for an instant. You can check that behaviour here https://developers.quaderno.io/api/#tag/Invoices/operation/createInvoice

Not sure if this comes from Redocusaurus, Redoc, or Docusaurus ๐Ÿ™

jrub commented 1 year ago

For more info, I'm using the "Custom Page" way, like in:

import React from 'react';
import Layout from '@theme/Layout';
import Redoc from '@theme/Redoc';
import useSpecData from '@theme/useSpecData';

function CustomPage() {
  const specData = useSpecData('openapi');
  return (
    <Layout
      title="..."
      description="..."
    >
      <Redoc {...specData} />
    </Layout>
  );
}

export default CustomPage;
jrub commented 1 year ago

Also, all crawlers are getting 404 so this is bad for SEO :-/

rohit-gohri commented 1 year ago

all crawlers are getting 404 so this is bad for SEO :-/

that sucks ๐Ÿ˜•

I see that the link now works without JS and returns 200 in the network tab, did you find a solution to this?

Also could not reproduce this in the examples - https://redocusaurus.vercel.app/examples/using-single-yaml/#tag/store/operation/getInventory

Any extra steps to reproduce this?

jrub commented 1 year ago

Yes! The key is that Gh-pages need trailingSlash to true, or the 404 will happen

El mar, 18 abr 2023 0:01, Rohit Gohri @.***> escribiรณ:

all crawlers are getting 404 so this is bad for SEO :-/

that sucks ๐Ÿ˜•

I see that the link now works without JS and returns 200 in the network tab, did you find a solution to this?

โ€” Reply to this email directly, view it on GitHub https://github.com/rohit-gohri/redocusaurus/issues/282#issuecomment-1512138770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADTIHBXQIEEYEKI43JOZXTXBW4VJANCNFSM6AAAAAAWM6IH3M . You are receiving this because you authored the thread.Message ID: @.***>

rohit-gohri commented 1 year ago

Cool, closing this then. Thanks for sharing