Skip to content

Commit 8c3ecd1

Browse files
authored
Standardize FWE lesson names, paths, and links (#7094)
- Moves FWE content to `/learn/tutorial` to match docs.flutter.dev. - Adds a new placeholder index for a general learning page at `/learn` for @ericwindmill to fill out. Leaves a temporary redirect incase someone navigates to it before its filled out. - Updates some lesson paths to be more consistent. - Updates the lesson primary titles to each be task orientated (since this a tutorial). - Updates the lesson titles, links, and urls in the index and previous/next page cards. Fixes #7052
1 parent 6dfe5a5 commit 8c3ecd1

24 files changed

+156
-138
lines changed

firebase.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
{ "source": "/faq", "destination": "/resources/faq", "type": 301 },
170170
{ "source": "/ffi", "destination": "/interop/c-interop", "type": 301 },
171171
{ "source": "/flutter", "destination": "https://flutter.dev", "type": 301 },
172+
{ "source": "/get-started{,/**}", "destination": "/learn/tutorial", "type": 301 },
172173
{ "source": "/glossary", "destination": "/resources/glossary", "type": 301 },
173174
{ "source": "/glossary/:entry", "destination": "/resources/glossary#:entry", "type": 301 },
174175

@@ -353,6 +354,7 @@
353354
{ "source": "/language/macros", "destination": "https://blog.dart.dev/an-update-on-dart-macros-data-serialization-06d3037d4f12", "type": 301 },
354355
{ "source": "/language/null-safety", "destination": "/null-safety", "type": 301 },
355356
{ "source": "/language/specification", "destination": "/resources/language/spec", "type": 301 },
357+
{ "source": "/learn", "destination": "/docs", "type": 301 },
356358
{ "source": "/libraries/async", "destination": "/libraries/dart-async", "type": 301 },
357359
{ "source": "/libraries/serialization", "destination": "/libraries/serialization/json", "type": 301 },
358360
{ "source": "/linter/lints/:lint*", "destination": "/tools/linter-rules/:lint", "type": 301 },

site/lib/src/components/layout/header.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class DashHeader extends StatelessComponent {
9191
]),
9292
li([
9393
if (activeEntry == ActiveNavEntry.learn)
94-
const a(href: '/get-started', classes: 'nav-link active', [
94+
const a(href: '/learn', classes: 'nav-link active', [
9595
.text('Learn'),
9696
])
9797
else

site/lib/src/style_hash.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// dart format off
33

44
/// The generated hash of the `main.css` file.
5-
const generatedStylesHash = '';
5+
const generatedStylesHash = 'RHmO6DK8CuPj';

site/lib/src/utils/active_nav.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ ActiveNavEntry? activeNavEntry(String pageUrlPath) {
1414
return switch (firstFragment) {
1515
'overview' => ActiveNavEntry.overview,
1616
'community' => ActiveNavEntry.community,
17-
'get-started' => ActiveNavEntry.learn,
17+
'learn' || 'get-started' => ActiveNavEntry.learn,
1818
'get-dart' => ActiveNavEntry.getDart,
1919
'deprecated' ||
2020
'docs' ||
2121
'effective-dart' ||
22-
'get-started' ||
2322
'interop' ||
2423
'language' ||
2524
'libraries' ||

src/content/get-started/index.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/content/learn/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Learn Dart
3+
breadcrumb: Learn
4+
description: >-
5+
Get started learning the Dart programming language.
6+
sidenav: getStarted
7+
sitemap: false
8+
noindex: true
9+
---
10+
11+
TODO(ewindmill): Fill with content.

src/content/get-started/advanced-oop.md renamed to src/content/learn/tutorial/advanced-oop.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
2-
title: Advanced OOP-adjacent features
3-
shortTitle: Advanced OOP Features
2+
title: Extend your app with enums and extensions
3+
shortTitle: Advanced OOP features
44
description: >-
5-
Enhance your Dart skills by exploring advanced features like enhanced enums
6-
and extensions. Improve your application's output formatting and color,
5+
Enhance your Dart skills by exploring
6+
advanced features like enhanced enums and extensions.
7+
Improve your application's output formatting and color,
78
making it more user-friendly.
89
sitemap: false
910
noindex: true
1011
layout: learn
1112
prevpage:
12-
url: /get-started/error-handling
13-
title: Error handling
13+
url: /learn/tutorial/error-handling
14+
title: Handle errors gracefully
1415
nextpage:
15-
url: /get-started/command-runner-polish
16-
title: command_runner polish
16+
url: /learn/tutorial/cli-polish
17+
title: Polish your CLI app
1718
---
1819

1920
{% render 'fwe-wip-warning.md', site: site %}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: Intro to async and HTTP
3-
shortTitle: Async and HTTP
2+
title: Write asynchronous code
3+
shortTitle: Async code
44
description: >-
55
Learn about asynchronous programming in Dart and how to make HTTP requests.
66
sitemap: false
77
noindex: true
88
layout: learn
99
prevpage:
10-
url: /get-started/add-commands
11-
title: Make your program interactive
10+
url: /learn/tutorial/interactivity
11+
title: Add interactivity to your app
1212
nextpage:
13-
url: /get-started/packages-libs
14-
title: Packages and libraries
13+
url: /learn/tutorial/packages-libs
14+
title: Organize code with packages and libraries
1515
---
1616

1717
{% render 'fwe-wip-warning.md', site: site %}

src/content/get-started/command-runner-polish.md renamed to src/content/learn/tutorial/cli-polish.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Command_runner polish
3-
shortTitle: Command_runner polish
2+
title: Polish your CLI app
3+
shortTitle: CLI polish
44
description: >-
5-
Improve the HelpCommand to provide more detailed information and add an
6-
onOutput argument for flexible output handling.
5+
Improve the HelpCommand to provide more detailed information and
6+
add an onOutput argument for flexible output handling.
77
sitemap: false
88
noindex: true
99
layout: learn
1010
prevpage:
11-
url: /get-started/advanced-oop
12-
title: Advanced OOP features
11+
url: /learn/tutorial/advanced-oop
12+
title: Extend your app with enums and extensions
1313
nextpage:
14-
url: /get-started/data-and-json
15-
title: Data and JSON
14+
url: /learn/tutorial/data-and-json
15+
title: Work with JSON data
1616
---
1717

1818
{% render 'fwe-wip-warning.md', site: site %}
@@ -243,7 +243,7 @@ In this lesson, you learned:
243243
244244
## Quiz
245245
246-
<Quiz title="Check your understanding" id="command-runner-polish" />
246+
<Quiz title="Check your understanding" id="cli-polish" />
247247
248248
## Next lesson
249249

src/content/get-started/data-and-json.md renamed to src/content/learn/tutorial/data-and-json.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
2-
title: Data and JSON
2+
title: Work with JSON data
3+
shortTitle: Data and JSON
34
description: >-
45
Learn about JSON deserialization in Dart, including how to
5-
use `dart:convert`, `jsonDecode`, and pattern matching to work with
6-
JSON data from the Wikipedia API.
6+
use `dart:convert`, `jsonDecode`, and pattern matching to
7+
work with JSON data from the Wikipedia API.
78
sitemap: false
89
noindex: true
910
layout: learn
1011
prevpage:
11-
url: /get-started/command-runner-polish
12-
title: Command runner polish
12+
url: /learn/tutorial/cli-polish
13+
title: Polish your CLI app
1314
nextpage:
14-
url: /get-started/testing
15-
title: Testing
15+
url: /learn/tutorial/testing
16+
title: Test your app & code
1617
---
1718

1819
{% render 'fwe-wip-warning.md', site: site %}

0 commit comments

Comments
 (0)