treeverse / lakeFS

lakeFS - Data version control for your data lake | Git for data
https://docs.lakefs.io
Apache License 2.0
4.48k stars 359 forks source link

[docs] Redirects are broken #5630

Closed rmoff closed 1 year ago

rmoff commented 1 year ago

on the website we're directing users to the Quickstart via the CTA (call to action) Run locally but it's to this link: https://docs.lakefs.io/quickstart/run.html

There's a redirect but it doesn't look like it's working:

https://github.com/treeverse/lakeFS/blob/master/docs/quickstart/index.md?plain=1#L15

rmoff commented 1 year ago

ref also #5484

rmoff commented 1 year ago

The redirect for /quickstart/run.html is actually there, but in the wrong path

CleanShot 2023-04-04 at 14 12 18


Problem

This looks like a bigger issue with redirects across the docs site. Here's another example:

New: https://docs.lakefs.io/reference/cli.html Old: https://docs.lakefs.io/reference/commands.html

Redirect code: https://github.com/treeverse/lakeFS/blob/master/docs/reference/cli.md?plain=1#L9

But there's no redirect - https://docs.lakefs.io/reference/commands.html serves up the page as it was before being renamed.

CleanShot 2023-04-04 at 14 10 41

Looking at the live docs repo site both files are still live (with no redirect)

CleanShot 2023-04-04 at 14 09 40

The clue of what's going on is here:

CleanShot 2023-04-04 at 14 11 26

The redirect file is under / (incorrect) and not /reference (where it should be)

This is confirmed by inspecting the redirect.json that the Jeykll plugin creates on site build:

image


Cause/Fix

It looks like the redirect_from syntax requires absolute pathing and not relative.

This front matter config in reference/cli.md

redirect_from:
  - /reference/commands.html

… creates _site/reference/commands.html

whilst this (the existing) in the same file (reference/cli.md) …

redirect_from:
  - ./commands.html

… creates _site/commands.html