mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

RTD: Redirect pages to `.html` files

Open LecrisUT opened this issue 1 year ago • 1 comments
trafficstars

Description

Navigating a static page seems to be broken when hosted on RTD. The files are there, but the path /quickstart does not automatically translate to /quickstart.html

Workaround

Was hoping that adding symlinks would resolve this issue, but apparently not:

    - find $READTHEDOCS_OUTPUT/html -type f -iname "*.html" -exec sh -c "ln -s \$(basename \"\$1\") \$(dirname \"\$1\")/\$(basename \"\$1\" .html)" sh {} \;

So back to the drawing board

Proposed solution

Wish I knew :disappointed:

Related

  • #188
  • #302
  • #982

LecrisUT avatar Mar 14 '24 15:03 LecrisUT

There might be a solution for RTD using their builtin redirection https://github.com/readthedocs/readthedocs.org/issues/11220. Still I'm not sure if this is an issue to be solved at the generation level or at the hosting level. npx serve indeed seems to redirect all urls appropriately, but how does it do that?

LecrisUT avatar Mar 18 '24 09:03 LecrisUT