Fix broken home link (#1918)

* Serve docs at `/` instead of `/docs`, no `/intro`

* fix links

* update workflow
This commit is contained in:
Muhammad Hamza 2021-06-13 23:25:48 +05:00 committed by GitHub
parent f71ce826d9
commit ec1ebe6756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 43 additions and 54 deletions

View File

@ -3,13 +3,11 @@ on:
pull_request:
branches: [master]
paths:
- "docs/**"
- "website/**"
# firebase.json has no effect here
- "firebase.json"
push:
branches: [master]
paths:
- "docs/**"
- "website/**"
- "firebase.json"
@ -23,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "12.x"
node-version: "14.x"
- name: Build
run: |

View File

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

View File

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

View File

@ -42,8 +42,8 @@ As an example, check out the TodoMVC example here: <https://examples.yew.rs/todo
| [mount_point](mount_point) | Shows how to mount the root component to a custom element |
| [multi_thread](multi_thread) | Demonstrates the use of Web Workers to offload computation to the background |
| [nested_list](nested_list) | Renders a styled list which tracks hover events |
| [node_refs](node_refs) | Uses a [`NodeRef`](https://yew.rs/docs/concepts/components/refs) to focus the input element under the cursor |
| [pub_sub](pub_sub) | Cross-component communication using [Agents](https://yew.rs/docs/concepts/agents) |
| [node_refs](node_refs) | Uses a [`NodeRef`](https://yew.rs/concepts/components/refs) to focus the input element under the cursor |
| [pub_sub](pub_sub) | Cross-component communication using [Agents](https://yew.rs/concepts/agents) |
| [router](router) | The best yew blog built with `yew-router` |
| [store](store) | Showcases the `yewtil::store` API |
| [timer](timer) | Demonstrates the use of the interval and timeout services |
@ -53,7 +53,7 @@ As an example, check out the TodoMVC example here: <https://examples.yew.rs/todo
## Next steps
Have a look at Yew's [starter templates](https://yew.rs/docs/getting-started/starter-templates) when starting a project using Yew  they can significantly simplify things.
Have a look at Yew's [starter templates](https://yew.rs/getting-started/starter-templates) when starting a project using Yew  they can significantly simplify things.
## Help out

View File

@ -10,7 +10,7 @@ It's possible to create new clients and clear the list entirely.
This example features multiple views ("scenes") which the user can switch between.
For a much more sophisticated approach check out [`yew-router`](https://yew.rs/docs/en/concepts/router/).
For a much more sophisticated approach check out [`yew-router`](https://yew.rs/en/concepts/router/).
One major flaw with the implementation used by this example is that the scenes aren't tied to the URL.
Reloading the page always brings the user back to the initial scene.

View File

@ -8,5 +8,5 @@
Uses an [Agent] that runs in a [Web Worker].
[agent]: https://yew.rs/docs/en/concepts/agents/
[agent]: https://yew.rs/en/concepts/agents/
[web worker]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers

View File

@ -6,7 +6,7 @@ This example shows two input fields which are automatically focused when hovered
## Concepts
The example uses [Refs](https://yew.rs/docs/en/concepts/components/refs/) to
The example uses [Refs](https://yew.rs/en/concepts/components/refs/) to
manipulate the underlying DOM element directly.
## Improvements

View File

@ -18,4 +18,4 @@ including: all entries, entered text and chosen filter.
- Clean up the code
[`storageservice`]: https://docs.rs/yew-services/latest/yew_services/struct.StorageService.html
[`refs`]: https://yew.rs/docs/en/concepts/components/refs/
[`refs`]: https://yew.rs/en/concepts/components/refs/

View File

@ -4,18 +4,7 @@
"target": "website",
"public": "website/build/",
"cleanUrls": true,
"redirects": [
{
"source": "/",
"destination": "/docs/intro/",
"type": 302
},
{
"source": "/docs/next",
"destination": "/docs/next/intro/",
"type": 302
}
]
"redirects": []
},
{
"target": "examples",

View File

@ -27,7 +27,7 @@ use std::rc::Rc;
///
/// See the pre-defined hooks for examples of how to use this function.
///
/// [Yew Docs]: https://yew.rs/docs/next/concepts/function-components/custom-hooks
/// [Yew Docs]: https://yew.rs/next/concepts/function-components/custom-hooks
pub fn use_hook<InternalHook: 'static, Output, Tear: FnOnce(&mut InternalHook) + 'static>(
initializer: impl FnOnce() -> InternalHook,
runner: impl FnOnce(&mut InternalHook, HookUpdater) -> Output,

View File

@ -12,7 +12,7 @@
//! }
//! ```
//!
//! More details about function components and Hooks can be found on [Yew Docs](https://yew.rs/docs/next/concepts/function-components)
//! More details about function components and Hooks can be found on [Yew Docs](https://yew.rs/next/concepts/function-components)
use scoped_tls_hkt::scoped_thread_local;
use std::cell::RefCell;

View File

@ -86,7 +86,7 @@ pub trait Component: Sized + 'static {
/// Components define their visual layout using a JSX-style syntax through the use of the
/// `html!` procedural macro. The full guide to using the macro can be found in [Yew's
/// documentation](https://yew.rs/docs/concepts/html).
/// documentation](https://yew.rs/concepts/html).
fn view(&self) -> Html;
/// The `rendered` method is called after each time a Component is rendered but

View File

@ -119,7 +119,7 @@ pub use yew_macro::classes;
///
/// [`Html`]: ./html/type.Html.html
/// [`html_nested!`]: ./macro.html_nested.html
/// [Yew Docs]: https://yew.rs/docs/concepts/html/
/// [Yew Docs]: https://yew.rs/concepts/html/
pub use yew_macro::html;
/// This macro is similar to [`html!`], but preserves the component type instead
@ -259,7 +259,7 @@ pub use yew_macro::html_nested;
///
/// [`html!`]: ./macro.html.html
/// [`Properties`]: ./html/trait.Properties.html
/// [Yew Docs]: https://yew.rs/docs/concepts/components/properties
/// [Yew Docs]: https://yew.rs/concepts/components/properties
pub use yew_macro::props;
/// This module contains macros which implements html! macro and JSX-like templates

View File

@ -1,5 +1,6 @@
---
title: "Introduction"
slug: /
---
## What is Yew?

View File

@ -25,12 +25,6 @@ module.exports = {
type: 'localeDropdown',
position: 'left',
},
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Docs',
},
{
href: 'https://docs.rs/yew',
position: 'right',
@ -109,8 +103,8 @@ module.exports = {
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/yewstack/yew/blob/master/website/',
editUrl: 'https://github.com/yewstack/yew/blob/master/website/',
routeBasePath: '/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),

View File

@ -251,7 +251,7 @@ impl Component for MyComponent {
:::note
以下のテーブルでは`yew``web-sys`と使う場合 (デフォルトでは使うようになっている) `web-sys`のイベントの型が使われるべきです。
`yew-stdweb`クレートを使う場合は`stdweb`のイベントの型を使用してください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/docs/getting-started/choose-web-library)をご確認ください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/getting-started/choose-web-library)をご確認ください。
:::
:::note

View File

@ -251,7 +251,7 @@ impl Component for MyComponent {
:::note
以下のテーブルでは`yew``web-sys`と使う場合 (デフォルトでは使うようになっている) `web-sys`のイベントの型が使われるべきです。
`yew-stdweb`クレートを使う場合は`stdweb`のイベントの型を使用してください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/docs/getting-started/choose-web-library)をご確認ください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/getting-started/choose-web-library)をご確認ください。
:::
:::note

View File

@ -1,5 +1,6 @@
---
title: Introduction
slug: /
---
## Yewとは?

View File

@ -251,7 +251,7 @@ impl Component for MyComponent {
:::note
以下のテーブルでは`yew``web-sys`と使う場合 (デフォルトでは使うようになっている) `web-sys`のイベントの型が使われるべきです。
`yew-stdweb`クレートを使う場合は`stdweb`のイベントの型を使用してください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/docs/getting-started/choose-web-library)をご確認ください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/getting-started/choose-web-library)をご確認ください。
:::
:::note

View File

@ -1,5 +1,6 @@
---
title: Introduction
slug: /
---
## Yewとは?

View File

@ -1,5 +1,6 @@
---
title: Introduction
slug: /
---
## Yew 是什么?

View File

@ -19,7 +19,7 @@ description: Yew 框架规划功能的路线图
### 指南
* 最佳实践:[https://yew.rs/docs/optimizations](https://yew.rs/docs/optimizations)
* 最佳实践:[https://yew.rs/optimizations](https://yew.rs/optimizations)
* 端到端教程
* Futures / 并发
* CSS / 样式

View File

@ -19,7 +19,7 @@ description: Yew 框架规划功能的路线图
### 指南
* 最佳实践:[https://yew.rs/docs/optimizations](https://yew.rs/docs/optimizations)
* 最佳实践:[https://yew.rs/optimizations](https://yew.rs/optimizations)
* 端到端教程
* Futures / 并发
* CSS / 样式

View File

@ -1,5 +1,6 @@
---
title: 介绍
slug: /
---
## Yew 是什么?

View File

@ -19,7 +19,7 @@ description: Yew 框架规划功能的路线图
### 指南
* 最佳实践:[https://yew.rs/docs/optimizations](https://yew.rs/docs/optimizations)
* 最佳实践:[https://yew.rs/optimizations](https://yew.rs/optimizations)
* 端到端教程
* Futures / 并发
* CSS / 样式

View File

@ -8,6 +8,6 @@ description: 用來產生 HTML 與 SVG 的巨集
**重要提示**
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/docs/concepts/html/lists) 來繞過這個限制。)
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/concepts/html/lists) 來繞過這個限制。)
2. 空的 `html! {}` 是合法的,且他不會渲染任何東西在畫面上
3. 字串必須被雙引號與大括號包裹住:`html! { "Hello, World" }`

View File

@ -1,5 +1,6 @@
---
title: 簡介
slug: /
---
## 什麼是 Yew

View File

@ -8,6 +8,6 @@ description: 用來產生 HTML 與 SVG 的巨集
**重要提示**
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/docs/concepts/html/lists) 來繞過這個限制。)
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/concepts/html/lists) 來繞過這個限制。)
2. 空的 `html! {}` 是合法的,且他不會渲染任何東西在畫面上
3. 字串必須被雙引號與大括號包裹住:`html! { "Hello, World" }`

View File

@ -8,6 +8,6 @@ description: 用來產生 HTML 與 SVG 的巨集
**重要提示**
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/docs/concepts/html/lists) 來繞過這個限制。)
1. 在 `html!` 裡,只能有一個根結點(但你可以用 [Fragment 或是 Iterators](https://yew.rs/concepts/html/lists) 來繞過這個限制。)
2. 空的 `html! {}` 是合法的,且他不會渲染任何東西在畫面上
3. 字串必須被雙引號與大括號包裹住:`html! { "Hello, World" }`

View File

@ -1,5 +1,6 @@
---
title: 簡介
slug: /
---
## 什麼是 Yew

View File

@ -251,7 +251,7 @@ impl Component for MyComponent {
:::note
以下のテーブルでは`yew``web-sys`と使う場合 (デフォルトでは使うようになっている) `web-sys`のイベントの型が使われるべきです。
`yew-stdweb`クレートを使う場合は`stdweb`のイベントの型を使用してください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/docs/getting-started/choose-web-library)をご確認ください。
詳細については[`web-sys`と`stdweb`をどちらを使うべきかについてのドキュメント](https://yew.rs/getting-started/choose-web-library)をご確認ください。
:::
:::note

View File

@ -197,7 +197,7 @@ impl Component for MyComponent {
In the following table `web-sys`'s event types should only be used if you're using `yew` with `web-sys`
(this is enabled by default). Use `stdweb`'s event types if you're using the `yew-stdweb` crate. See
[the documentation page about whether to choose `web-sys` or `stdweb`](https://yew.rs/docs/getting-started/choose-web-library) for more information.
[the documentation page about whether to choose `web-sys` or `stdweb`](https://yew.rs/getting-started/choose-web-library) for more information.
:::tip
All the event types mentioned in the following table are re-exported under `yew::events`.

View File

@ -1,5 +1,6 @@
---
title: "Introduction"
slug: /
---
## What is Yew?