nervosnetwork/ckb-std

Out of date Github pages docs

Closed this issue · 3 comments

phroi commented

While using ckb-std, I noticed that ckb-std github pages docs do not report CKB2021:
Screenshot from 2022-10-22 20-48-14

On the other hand the library itself clearly supports CKB2021:
Screenshot from 2022-10-22 20-55-19

Keep up the great work,
Phroi 💪

phroi commented

Mmmmmh, this is fixed in the docs pointed in the repository description, still would be nice to at least warn or redirect users of the Github pages docs to the new docs.rs version.

@phroi
Where do you find this link:ckb-std github pages docs

I think we better remove this doc from github pages, only keep the docs.rs doc.

phroi commented

@phroi Where do you find this link:ckb-std github pages docs

Google, first result!! When I started developing iCKB scripts I had no idea where the libraries where located, so I started by studying Jordan Mack's SUDT example and googling those functions and structures..

image

I think we better remove this doc from github pages, only keep the docs.rs doc.

I agree, but let's at least put a redirect!! Feel free to remove all old doc pages and set this as custom 404 page!

<!DOCTYPE html>
<html lang="en">

<head>
  <meta http-equiv="content-language" content="en-us" />
  <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
  <meta http-equiv="Content-Security-Policy"
    content="default-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'self'" />
  <title>Docs of ckb-std moved</title>
  <style type="text/css" media="screen">
    body {
      background-color: #f1f1f1;
      margin: 0;
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    }

    .container {
      margin: 50px auto 40px auto;
      width: 600px;
      text-align: center;
    }

    a {
      color: #4183c4;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    h1 {
      width: 800px;
      position: relative;
      left: -100px;
      letter-spacing: -1px;
      line-height: 60px;
      font-size: 60px;
      font-weight: 100;
      margin: 0px 0 50px 0;
      text-shadow: 0 1px 0 #fff;
    }

    p {
      color: rgba(0, 0, 0, 0.5);
      margin: 20px 0;
      line-height: 1.6;
    }
  </style>
</head>

<meta http-equiv="refresh" content="6;URL=https://docs.rs/ckb-std/latest/ckb_std/">

<body>
  <div class="container">

    <h1>404</h1>

    <p><strong>Docs of ckb-std permanently moved</strong></p>

    <p>The page you are looking for is no longer here, bummer!</p>

    <p>You'll be redirected automatically to the
      <a id="newURL" href="https://docs.rs/ckb-std/latest/ckb_std/">
        new version available at docs.rs
      </a>
    </p>

    <script>
      // Redirect to the actual page the user wanted to go.
      let tail = window.location.href.split("/doc/")[1];
      if (tail) {
        let library = tail.split("/")[0];
        newURL = "https://docs.rs/" + library + "/latest/" + tail;
        setTimeout(() => { window.location.replace(newURL); }, 5000);
        document.getElementById("newURL").setAttribute('href', newURL)
      }
    </script>
  </div>
</body>

</html>