Skip to content

Commit 13e209b

Browse files
committed
Merge 'upstream/master' into 'stanwolverine/master'
2 parents 16f22ea + 44afd93 commit 13e209b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+798
-301
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Test code blocks in markdown
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Install Rust
2020
run: rustup update stable
2121

@@ -31,7 +31,7 @@ jobs:
3131
name: Test tutorial-code directory
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Install Rust
3636
run: rustup update stable
3737

@@ -43,3 +43,17 @@ jobs:
4343
- name: Actually run the tests
4444
run: cargo test --all
4545
working-directory: tutorial-code
46+
fmt-check:
47+
name: Verify project code style
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Install node dependencies
56+
run: npm install
57+
58+
- name: Check formatting
59+
run: npm run fmt:check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The website for the Tokio project. Lives at https://tokio.rs.
44

55
Besides containing the content for the website, it also includes crates
66
containing the example code used in the tutorial. These crates can be compiled
7-
and ran.
7+
and run.
88

99
* [hello-tokio](tutorial-code/hello-tokio/src/main.rs)
1010
* [spawning](tutorial-code/spawning/src/main.rs)

components/content.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Menu from "../components/menu";
1+
import Menu from "./menu";
22
import { DiscordIcon, GitHubIcon } from "./icons";
33
import React, { useEffect, useMemo, useRef, useState } from "react";
44
import Link from "next/link";
@@ -112,6 +112,7 @@ export default function Content({
112112
prev,
113113
body,
114114
mdPath,
115+
description,
115116
}) {
116117
const isBlogRoute = href.startsWith("/blog");
117118

@@ -146,9 +147,13 @@ export default function Content({
146147
<section className="section content">
147148
<div className="columns">
148149
<div className="column is-two-thirds tk-markdown" ref={mdRef}>
149-
<h1 className="title" id="">
150+
<h1
151+
className={`title ${isBlogRoute ? "blog-title" : ""}`}
152+
id=""
153+
>
150154
{title}
151155
</h1>
156+
{isBlogRoute && <p className="description">{description}</p>}
152157
<div dangerouslySetInnerHTML={{ __html: body }}></div>
153158
<Footer next={next} prev={prev} mdPath={mdPath} />
154159
</div>

components/footer.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ export default function Footer() {
1717
<div key={name} className="column is-one-third">
1818
<p className="tk-lib-name">{name}</p>
1919
<p>
20-
<a href={docs}>Docs</a>
20+
<a href={docs} target="_blank">
21+
Docs
22+
</a>
2123
</p>
2224
<p>
23-
<a href={github}>Github</a>
25+
<a href={github} target="_blank">
26+
Github
27+
</a>
2428
</p>
2529
</div>
2630
));
@@ -38,16 +42,19 @@ export default function Footer() {
3842
<div className="tk-help-links">
3943
<p>
4044
Get Help:
41-
<a href="https://github.com/tokio-rs/tokio/discussions">
45+
<a
46+
href="https://github.com/tokio-rs/tokio/discussions"
47+
target="_blank"
48+
>
4249
<GitHubIcon className="is-medium" />
4350
</a>
44-
<a href="https://discord.gg/tokio">
51+
<a href="https://discord.gg/tokio" target="_blank">
4552
<DiscordIcon className="is-medium" />
4653
</a>
4754
</p>
4855
<p>
4956
Stay up to date:
50-
<a href="https://twitter.com/tokio_rs">
57+
<a href="https://twitter.com/tokio_rs" target="_blank">
5158
<TwitterIcon className="is-medium" />
5259
</a>
5360
</p>
@@ -74,7 +81,10 @@ export default function Footer() {
7481
<div className="container has-text-centered">
7582
<p>
7683
with the help of{" "}
77-
<a href="https://github.com/tokio-rs/tokio/graphs/contributors">
84+
<a
85+
href="https://github.com/tokio-rs/tokio/graphs/contributors"
86+
target="_blank"
87+
>
7888
our contributors
7989
</a>
8090
.
@@ -83,7 +93,11 @@ export default function Footer() {
8393
<div className="container has-text-centered">
8494
<p>
8595
Hosted by{" "}
86-
<a href="https://netlify.com" rel="sponsored nofollow">
96+
<a
97+
href="https://netlify.com"
98+
target="_blank"
99+
rel="sponsored nofollow"
100+
>
87101
Netlify
88102
</a>
89103
</p>

components/icons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function TwitterIcon({ className = "" }) {
4747
<Icon className={className}>
4848
<path
4949
className="tk-svg-path"
50-
d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5t-115.5 248.5-184.5 210.5-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5t-114-159.5q33 5 61 5 43 0 85-11-112-23-185.5-111.5t-73.5-205.5v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5t371.5 99.5q-8-38-8-74 0-134 94.5-228.5t228.5-94.5q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z"
50+
d="m 1033.0757,785.67723 536.386,-610.09838 H 1442.3554 L 976.61152,705.31871 604.62327,175.57885 H 175.57884 L 738.0981,976.63931 175.57884,1616.4212 h 127.11352 l 491.83748,-559.4233 392.84686,559.4233 h 429.0444 L 1033.0445,785.67723 Z M 858.97635,983.69686 801.9814,903.9293 348.49316,269.21053 h 195.2389 l 365.97034,512.23831 56.9949,79.76754 475.7181,665.83142 H 1247.1765 L 858.97635,983.72736 Z"
5151
fill="#fff"
5252
/>
5353
</Icon>

components/menu.jsx renamed to components/menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Fragment, useCallback, useState } from "react";
22
import classnames from "classnames";
3-
import Link from "next/link";
43

54
const monthNames = [
65
"January",
@@ -130,7 +129,8 @@ function Level2({ href, menu }) {
130129
return <ul>{items}</ul>;
131130
}
132131

133-
function pagesFor(menu) {
132+
// TODO: Type the menu hierarchy
133+
function pagesFor(menu: Record<PropertyKey, any>) {
134134
return Object.entries(menu).map(([, entry]) => {
135135
if (entry.page) {
136136
return {

content/blog/2017-01-tokio-0-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: "2017-01-10"
33
title: "Announcing Tokio 0.1"
4-
description: "10 January 2017"
4+
description: "January 10, 2017"
55
---
66

77
Today we are publishing the preliminary version of the Tokio stack, 0.1!

content/blog/2017-03-tokio-io.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: "2017-03-17"
33
title: "Announcing the tokio-io Crate"
4-
description: "17 March 2017"
4+
description: "March 17, 2017"
55
---
66

77
Today we're happy to announce a new crate and several new tools to work with in

content/blog/2017-09-tokio-reform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: "2017-09-19"
33
title: "An RFC for a Tokio revamp"
4-
description: "19 September 2017"
4+
description: "September 19, 2017"
55
---
66

77
Hi there, Tokio community!

content/blog/2018-02-tokio-reform-shipped.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: "2018-02-07"
33
title: "Tokio Reform is Shipped and the Road to 0.2"
4-
description: "07 February 2018"
4+
description: "February 7, 2018"
55
---
66

77
Hi all!

0 commit comments

Comments
 (0)