Skip to content

chore: add frontmatter to examples for website #8218

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

Merged
merged 3 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions docs/examples/auth.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/examples/basic.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/examples/custom-filter-link.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/examples/custom-link.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/custom-query-parsing.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/index.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/examples/lazy-loading.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/examples/modal.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/examples/multi-app.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/route-objects.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/search-params.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/examples/ssr.md

This file was deleted.

5 changes: 5 additions & 0 deletions examples/auth/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Authentication
toc: false
---

# Auth Example

This example demonstrates how to restrict access to routes to authenticated users.
Expand Down
6 changes: 6 additions & 0 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Basics
toc: false
order: 1
---

# Basic Example

This example demonstrates some of the basic features of React Router, including:
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-filter-link/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Custom Filter Link
toc: false
---

# Custom Filter Link Example

This example demonstrates how to use a query string parameter to mark a link as "active" or not. This is a common technique when implementing a filter in a sidebar where you're browsing products.
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-link/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Custom Active Link
toc: false
---

# Custom Link Example

This example demonstrates how to make a custom `<Link>` component to render something different when the link is "active" using the `useMatch()` and `useResolvedPath()` hooks.
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-query-parsing/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Custom Query Parsing
toc: false
---

# Custom Query Parsing Example

This example demonstrates how to store a complex data structure in the URL query string using a custom hook.
Expand Down
5 changes: 5 additions & 0 deletions examples/lazy-loading/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Lazy Loading
toc: false
---

# Lazy Loading Example

This example demonstrates how to lazily load both
Expand Down
5 changes: 5 additions & 0 deletions examples/modal/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Modal
toc: false
---

# Modal Example

## Preview
Expand Down
5 changes: 5 additions & 0 deletions examples/multi-app/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Multi App
toc: false
---

# Multi App Example

This example demonstrates how to build a site with multiple React Router apps by mounting each at a URL pathname prefix using the `<Router basename>` prop. This essentially decouples the apps from each other and allows them to be portable and even deployed separately.
Expand Down
5 changes: 5 additions & 0 deletions examples/route-objects/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Route Objects
toc: false
---

# Route Objects Example

This example demonstrates how to use the `useRoutes()` hook to define and render routes using regular JavaScript objects instead of `<Routes>` and `<Route>` elements. This is mainly a stylistic preference that may make more sense in some scenarios, depending on the data structures you're working with to define your routes.
Expand Down
5 changes: 5 additions & 0 deletions examples/search-params/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Search Params
toc: false
---

# Search Params Example

This example demonstrates how to read and write the URL query string using the `useSearchParams()` hook. This hook is similar to the `useNavigate()` hook, but just for the [`search` portion of the URL](https://developer.mozilla.org/en-US/docs/Web/API/Location/search).
Expand Down
5 changes: 5 additions & 0 deletions examples/ssr/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Server Rendering
toc: false
---

# Server-side Rendering Example

This example adds [server-side rendering](https://reactjs.org/docs/react-dom-server.html) (SSR) to our basic example.
Expand Down