Fix broken link/redirects (#1881)

* Fix broken link/redirects

* Remove index page, update `commentURLPath`
This commit is contained in:
Muhammad Hamza 2021-05-27 20:11:49 +05:00 committed by GitHub
parent af7f3a9a1d
commit f024874026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 13 additions and 54 deletions

View File

@ -63,7 +63,7 @@ jobs:
targets: website targets: website
channelId: "${{ env.CHANNEL_ID }}" channelId: "${{ env.CHANNEL_ID }}"
# link to the next version because that's what we care about # link to the next version because that's what we care about
commentURLPath: "/docs/next/" commentURLPath: "/docs/next/intro"
# PR information # PR information
prNumber: "${{ env.PR_NUMBER }}" prNumber: "${{ env.PR_NUMBER }}"
prBranchName: "${{ env.PR_BRANCH }}" prBranchName: "${{ env.PR_BRANCH }}"

View File

@ -16,9 +16,9 @@
</p> </p>
<h4> <h4>
<a href="https://yew.rs/docs/">Documentation (stable)</a> <a href="https://yew.rs/docs/intro/">Documentation (stable)</a>
<span> | </span> <span> | </span>
<a href="https://yew.rs/docs/next/">Documentation (latest)</a> <a href="https://yew.rs/docs/next/intro/">Documentation (latest)</a>
<span> | </span> <span> | </span>
<a href="https://github.com/yewstack/yew/tree/v0.17/examples">Examples</a> <a href="https://github.com/yewstack/yew/tree/v0.17/examples">Examples</a>
<span> | </span> <span> | </span>
@ -26,11 +26,11 @@
<span> | </span> <span> | </span>
<a href="https://yew.rs/docs/more/roadmap">Roadmap</a> <a href="https://yew.rs/docs/more/roadmap">Roadmap</a>
<span> | </span> <span> | </span>
<a href="https://yew.rs/docs/zh-CN/">简体中文文档</a> <a href="https://yew.rs/zh-CN/docs/">简体中文文档</a>
<span> | </span> <span> | </span>
<a href="https://yew.rs/docs/zh-TW/">繁體中文文檔</a> <a href="https://yew.rs/zh-TW/docs/">繁體中文文檔</a>
<span> | </span> <span> | </span>
<a href="https://yew.rs/docs/ja/">ドキュメント</a> <a href="https://yew.rs/ja/docs/">ドキュメント</a>
</h4> </h4>
</div> </div>

View File

@ -5,42 +5,15 @@
"public": "website/build/", "public": "website/build/",
"cleanUrls": true, "cleanUrls": true,
"redirects": [ "redirects": [
// `/intro` -> `/` (2020-10-15)
{ {
"source": "/", "source": "/",
"destination": "/docs/index/", "destination": "/docs/intro/",
"type": 302 "type": 302
}, },
{ {
"source": "/docs/:lang/index", "source": "/docs/next",
"destination": "/:lang/docs/index", "destination": "/docs/next/intro/",
"type": 301 "type": 302
},
{
"source": "/docs/:lang/next/intro",
"destination": "/:lang/docs/next/index",
"type": 301
},
// legacy (2020-08-15)
{
"source": "/docs/v/zh_cn",
"destination": "/zh-CN/docs/",
"type": 301
},
{
"source": "/docs/v/zh_tw",
"destination": "/zh-TW/docs/",
"type": 301
},
{
"regex": "/docs/v/zh_cn/(.*)",
"destination": "/zh-CN/docs/:1",
"type": 301
},
{
"regex": "/docs/v/zh_tw/(.*)",
"destination": "/zh-TW/docs/:1",
"type": 301
} }
] ]
}, },

View File

@ -27,7 +27,7 @@ module.exports = {
}, },
{ {
type: 'doc', type: 'doc',
docId: 'index', docId: 'intro',
position: 'left', position: 'left',
label: 'Docs', label: 'Docs',
}, },

View File

@ -15,7 +15,7 @@ module.exports = {
// But you can create a sidebar manually // But you can create a sidebar manually
sidebar: [ sidebar: [
"index", "intro",
{ {
type: 'category', type: 'category',
label: 'Getting Started', label: 'Getting Started',

View File

@ -1,14 +0,0 @@
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout>
<h1>Hello {siteConfig.title}</h1>
</Layout>
);
}

View File

@ -2,7 +2,7 @@
"version-0.18.0/sidebar": [ "version-0.18.0/sidebar": [
{ {
"type": "doc", "type": "doc",
"id": "version-0.18.0/index" "id": "version-0.18.0/intro"
}, },
{ {
"collapsed": true, "collapsed": true,