Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: redirects issue #146

Merged
merged 15 commits into from Apr 26, 2023
Merged

fix: redirects issue #146

merged 15 commits into from Apr 26, 2023

Conversation

asmitbm
Copy link
Member

@asmitbm asmitbm commented Apr 20, 2023

Created three files by following this guide and for fixing oras redirect issues.

Fixes: #141

Reference file: https://github.com/oras-project/oras-www/blob/main/docs/custom/main.html

asmitbm and others added 14 commits April 12, 2023 05:54
Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
redirects/oras.mdx Outdated Show resolved Hide resolved
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://deploy-preview-146--oras-project.netlify.app/oras gives 404 not found without any <meta> and thus cannot be recognised by go.

@asmitbm
Copy link
Member Author

asmitbm commented Apr 22, 2023

https://deploy-preview-146--oras-project.netlify.app/oras gives 404 not found without any <meta> and thus cannot be recognised by go.

Strange, since those 3 files contain meta tags.

@shizhMSFT
Copy link
Contributor

@asmitbm You may run the following script to verify. /cc @FeynmanZhou

pr=146
for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" | 
        grep -e go-import -e go-source && 
        echo "< $module: verified" ||
        echo "< $module: failed"
done

Here's a sample output of a successful run:

$ pr=139
$ for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" |
        grep -e go-import -e go-source &&
        echo "< $module: verified" ||
        echo "< $module: failed"
done
> oras: checking
    <meta name=go-import content="oras.land/oras git https://github.com/oras-project/oras"><meta name=go-source content="oras.land/oras git https://github.com/oras-project/oras https://github.com/oras-project/oras/tree/main{/dir} https://github.com/oras-project/oras/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras"> 
< oras: verified
> oras-go: checking
    <meta charset=utf-8><meta name=go-import content="oras.land/oras-go git https://github.com/oras-project/oras-go"><meta name=go-source content="oras.land/oras-go git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras-go"> 
< oras-go: verified
> oras-go/v2: checking
    <meta charset=utf-8><meta name=go-import content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go"><meta name=go-source content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras-go"> 
< oras-go/v2: verified

and also a failed run:

$ pr=146
$ for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" |
        grep -e go-import -e go-source &&
        echo "< $module: verified" ||
        echo "< $module: failed"
done
> oras: checking
< oras: failed
> oras-go: checking
< oras-go: failed
> oras-go/v2: checking
< oras-go/v2: failed

@asmitbm
Copy link
Member Author

asmitbm commented Apr 25, 2023

@asmitbm You may run the following script to verify. /cc @FeynmanZhou

pr=146
for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" | 
        grep -e go-import -e go-source && 
        echo "< $module: verified" ||
        echo "< $module: failed"
done

Here's a sample output of a successful run:

$ pr=139
$ for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" |
        grep -e go-import -e go-source &&
        echo "< $module: verified" ||
        echo "< $module: failed"
done
> oras: checking
    <meta name=go-import content="oras.land/oras git https://github.com/oras-project/oras"><meta name=go-source content="oras.land/oras git https://github.com/oras-project/oras https://github.com/oras-project/oras/tree/main{/dir} https://github.com/oras-project/oras/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras"> 
< oras: verified
> oras-go: checking
    <meta charset=utf-8><meta name=go-import content="oras.land/oras-go git https://github.com/oras-project/oras-go"><meta name=go-source content="oras.land/oras-go git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras-go"> 
< oras-go: verified
> oras-go/v2: checking
    <meta charset=utf-8><meta name=go-import content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go"><meta name=go-source content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta http-equiv=refresh content="0; url=https://github.com/oras-project/oras-go"> 
< oras-go/v2: verified

and also a failed run:

$ pr=146
$ for module in oras oras-go oras-go/v2; do
    echo "> $module: checking"
    curl -s "https://deploy-preview-$pr--oras-project.netlify.app/$module" |
        grep -e go-import -e go-source &&
        echo "< $module: verified" ||
        echo "< $module: failed"
done
> oras: checking
< oras: failed
> oras-go: checking
< oras-go: failed
> oras-go/v2: checking
< oras-go/v2: failed

I’ll test this out today. Thank you!

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
@asmitbm
Copy link
Member Author

asmitbm commented Apr 25, 2023

Hey @shizhMSFT @FeynmanZhou this is the log I got after latest commit:

> oras: checking
<title data-rh="true">OCI Registry As Storage | OCI Registry As Storage</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" name="twitter:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" property="og:url" content="https://oras.land/oras/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="OCI Registry As Storage | OCI Registry As Storage"><meta data-rh="true" name="description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" property="og:description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" name="go-import" content="oras.land/oras git https://github.com/oras-project/oras"><meta data-rh="true" name="go-source" content="oras.land/oras git https://github.com/oras-project/oras https://github.com/oras-project/oras/tree/main{/dir} https://github.com/oras-project/oras/blob/main{/dir}/{file}#L{line}"><meta data-rh="true" http-equiv="refresh" content="0; url=https://github.com/oras-project/oras"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://oras.land/oras/"><link data-rh="true" rel="alternate" href="https://oras.land/oras/" hreflang="en"><link data-rh="true" rel="alternate" href="https://oras.land/oras/" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="OCI Registry As Storage RSS Feed">
< oras: verified
> oras-go: checking
<title data-rh="true">OCI Registry As Storage | OCI Registry As Storage</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" name="twitter:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" property="og:url" content="https://oras.land/oras-go/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="OCI Registry As Storage | OCI Registry As Storage"><meta data-rh="true" name="description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" property="og:description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" charset="utf-8"><meta data-rh="true" name="go-import" content="oras.land/oras-go git https://github.com/oras-project/oras-go"><meta data-rh="true" name="go-source" content="oras.land/oras-go git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta data-rh="true" http-equiv="refresh" content="0; url=https://github.com/oras-project/oras-go"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://oras.land/oras-go/"><link data-rh="true" rel="alternate" href="https://oras.land/oras-go/" hreflang="en"><link data-rh="true" rel="alternate" href="https://oras.land/oras-go/" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="OCI Registry As Storage RSS Feed">
< oras-go: verified
> oras-go/v2: checking
<title data-rh="true">OCI Registry As Storage | OCI Registry As Storage</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" name="twitter:image" content="https://oras.land/img/docusaurus-social-card.jpg"><meta data-rh="true" property="og:url" content="https://oras.land/oras-go/v2/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="OCI Registry As Storage | OCI Registry As Storage"><meta data-rh="true" name="description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" property="og:description" content="Description will go into a meta tag in &lt;head /&gt;"><meta data-rh="true" charset="utf-8"><meta data-rh="true" name="go-import" content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go"><meta data-rh="true" name="go-source" content="oras.land/oras-go/v2 git https://github.com/oras-project/oras-go https://github.com/oras-project/oras-go/tree/main{/dir} https://github.com/oras-project/oras-go/blob/main{/dir}/{file}#L{line}"><meta data-rh="true" http-equiv="refresh" content="0; url=https://github.com/oras-project/oras-go"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://oras.land/oras-go/v2/"><link data-rh="true" rel="alternate" href="https://oras.land/oras-go/v2/" hreflang="en"><link data-rh="true" rel="alternate" href="https://oras.land/oras-go/v2/" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="OCI Registry As Storage RSS Feed">
< oras-go/v2: verified

I think it's safe to say the issue is fixed now. Also, the URLs listed below redirects to their respective repositories:

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me for other parts.

@FeynmanZhou FeynmanZhou merged commit d05e67a into oras-project:dev Apr 26, 2023
6 checks passed
FeynmanZhou added a commit that referenced this pull request Apr 27, 2023
* feat: initial commit for docusaurus migration (#140)

* feat: initial commit for docusaurus migration

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions instead of block quotes

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* truncate blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions in blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add netlify.toml file

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* add netlify-plugin-cache

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* rename folders, add content and fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* remove old docs

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

---------

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add announcement bar and feature section update (#145)

* feat: initial commit for docusaurus migration

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions instead of block quotes

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* truncate blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions in blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add netlify.toml file

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* add netlify-plugin-cache

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* rename folders, add content and fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* remove old docs

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add anouncement bar and features content

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

---------

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* fix: redirects issue (#146)

* feat: initial commit for docusaurus migration

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions instead of block quotes

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* truncate blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* use admonitions in blog post

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add netlify.toml file

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* add netlify-plugin-cache

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* rename folders, add content and fix links

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* remove old docs

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* feat: add anouncement bar and features content

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* add redirect files

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

* fix redirect issues

Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

---------

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>

---------

Signed-off-by: Asmit2952 <asmitbm2952002@gmail.com>
Signed-off-by: Asmit Malakannawar <asmitbm2952002@gmail.com>
Co-authored-by: Asmit Malakannawar <81866614+asmitbm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants