From 8f9e82e3f73776ff0da9f9ab4c075730151b29c5 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 6 May 2024 15:09:02 -0500 Subject: [PATCH] Move some content out of deprecated `/guides` directories (#5769) Contributes to https://github.com/dart-lang/site-www/issues/5767 and https://github.com/dart-lang/site-www/issues/4565 by moving a few isolated pages within the `/guides` directory that have an existing suitable location to there. These are grouped as an initial step as they don't require larger content or restructuring changes, unlike some other pages within the `/guides` directory. | Original location | New location | |--------|--------| | `/guides/libraries/useful-libraries` | `/resources/useful-packages` | | `/guides/libraries/writing-package-pages` | `/tools/pub/writing-package-pages` | | `/guides/google-apis` | `/resources/google-apis` | | `/guides/language/coming-from/**` | `/resources/coming-from/**` | --- firebase.json | 7 ++++++- src/_data/side-nav.yml | 10 +++++----- src/content/guides/whats-new.md | 12 ++++++------ src/content/libraries/index.md | 2 +- src/content/overview.md | 4 ++-- .../language => resources}/coming-from/js-to-dart.md | 0 .../coming-from/swift-to-dart.md | 0 src/content/{guides => resources}/google-apis.md | 0 .../useful-packages.md} | 3 ++- src/content/server/google-cloud.md | 2 +- src/content/server/libraries.md | 2 +- src/content/tools/pub/package-layout.md | 2 +- src/content/tools/pub/publishing.md | 2 +- .../libraries => tools/pub}/writing-package-pages.md | 4 ++-- src/content/tutorials/server/httpserver.md | 2 +- 15 files changed, 29 insertions(+), 23 deletions(-) rename src/content/{guides/language => resources}/coming-from/js-to-dart.md (100%) rename src/content/{guides/language => resources}/coming-from/swift-to-dart.md (100%) rename src/content/{guides => resources}/google-apis.md (100%) rename src/content/{guides/libraries/useful-libraries.md => resources/useful-packages.md} (98%) rename src/content/{guides/libraries => tools/pub}/writing-package-pages.md (99%) diff --git a/firebase.json b/firebase.json index 58b42f2087..921fc3b799 100644 --- a/firebase.json +++ b/firebase.json @@ -194,8 +194,11 @@ { "source": "/googleapis", "destination": "https://github.com/dart-lang/googleapis", "type": 301 }, { "source": "/guides/get-started", "destination": "/overview", "type": 301 }, + { "source": "/guides/google-apis", "destination": "/resources/google-apis", "type": 301 }, { "source": "/guides/language/analysis-options", "destination": "/tools/analysis", "type": 301 }, { "source": "/guides/language/cheatsheet", "destination": "/language", "type": 301 }, + { "source": "/guides/language/coming-from/js-to-dart", "destination": "/resources/coming-from/js-to-dart", "type": 301 }, + { "source": "/guides/language/coming-from/swift-to-dart", "destination": "/resources/coming-from/swift-to-dart", "type": 301 }, { "source": "/guides/language/common-prob", "destination": "/guides/language/sound-problems", "type": 301 }, { "source": "/guides/language/concurrency", "destination": "/language/concurrency", "type": 301 }, { "source": "/guides/language/effective-dart", "destination": "/effective-dart", "type": 301 }, @@ -212,7 +215,9 @@ { "source": "/guides/libraries/futures-error-handling", "destination": "/libraries/async/futures-error-handling", "type": 301 }, { "source": "/guides/libraries/java-interop", "destination": "/interop/java-interop", "type": 301 }, { "source": "/guides/libraries/objective-c-interop", "destination": "/interop/objective-c-interop", "type": 301 }, - { "source": "/guides/libraries/c-interop", "destination": "/interop/c-interop", "type": 301 }, + { "source": "/guides/libraries/c-interop", "destination": "/interop/c-interop", "type": 301 }, + { "source": "/guides/libraries/writing-package-pages", "destination": "/tools/pub/writing-package-pages", "type": 301 }, + { "source": "/guides/libraries/useful-libraries", "destination": "/resources/useful-packages", "type": 301 }, { "source": "/guides/platforms", "destination": "/overview#platform", "type": 301 }, { "source": "/install", "destination": "/get-dart", "type": 301 }, { "source": "/install/**", "destination": "/get-dart", "type": 301 }, diff --git a/src/_data/side-nav.yml b/src/_data/side-nav.yml index c5141adfff..2d502444c8 100644 --- a/src/_data/side-nav.yml +++ b/src/_data/side-nav.yml @@ -167,13 +167,13 @@ - title: How to use packages permalink: /guides/packages - title: Commonly used packages - permalink: /guides/libraries/useful-libraries + permalink: /resources/useful-packages - title: Creating packages permalink: /guides/libraries/create-packages - title: Publishing packages permalink: /tools/pub/publishing - title: Writing package pages - permalink: /guides/libraries/writing-package-pages + permalink: /tools/pub/writing-package-pages - title: Package reference expanded: false children: @@ -206,7 +206,7 @@ - title: Number representation permalink: /guides/language/numbers - title: Google APIs - permalink: /guides/google-apis + permalink: /resources/google-apis - title: Multi-platform apps permalink: /multiplatform-apps - title: Command-line & server apps @@ -365,9 +365,9 @@ expanded: false children: - title: JavaScript to Dart - permalink: /guides/language/coming-from/js-to-dart + permalink: /resources/coming-from/js-to-dart - title: Swift to Dart - permalink: /guides/language/coming-from/swift-to-dart + permalink: /resources/coming-from/swift-to-dart - divider - title: FAQ permalink: /resources/faq diff --git a/src/content/guides/whats-new.md b/src/content/guides/whats-new.md index bf657f72c8..d99281c11a 100644 --- a/src/content/guides/whats-new.md +++ b/src/content/guides/whats-new.md @@ -367,7 +367,7 @@ we made the following changes to this site: [community resources section]: /community#additional-community-resources [migration guide]: /null-safety/migration-guide [unsound null safety]: /null-safety/unsound-null-safety -[Learning Dart as a Swift developer]: /guides/language/coming-from/swift-to-dart +[Learning Dart as a Swift developer]: /resources/coming-from/swift-to-dart [booleans and equality operators]: /effective-dart/usage#dont-use-true-or-false-in-equality-operations [content-hashing]: /tools/pub/glossary#content-hashes [Zones]: /articles/archive/zones @@ -381,7 +381,7 @@ we made the following changes to this site: [discussion]: /language/functions#parameters [Concurrency in Dart]: /language/concurrency [`pub global` page]: /tools/pub/cmd/pub-global -[Learning Dart as a JavaScript developer]: /guides/language/coming-from/js-to-dart +[Learning Dart as a JavaScript developer]: /resources/coming-from/js-to-dart [`dart run` page]: /tools/dart-run#debugging [operator precedence and associativity]: /language/operators [Building URIs]: /libraries/dart-core#building-uris @@ -525,7 +525,7 @@ we made the following changes to this site: * Updated the [security][] page to match our current security practices. * Added a key binding (`/`) to automatically focus the search bar. -[Learning Dart as a JavaScript developer]: /guides/language/coming-from/js-to-dart +[Learning Dart as a JavaScript developer]: /resources/coming-from/js-to-dart [Named parameters]: /language/functions#named-parameters [Enumerated types]: /language/enums @@ -716,7 +716,7 @@ we made the following changes to this site: [dart-tool]: /tools/dart-tool [recommended linter rules]: /tools/analysis#lints [core libraries]: /libraries -[commonly used packages]: /guides/libraries/useful-libraries +[commonly used packages]: /resources/useful-packages [dart.dev/jobs]: /jobs [no-promo]: /tools/non-promotion-reasons [`dart create`]: /tools/dart-create @@ -794,9 +794,9 @@ we made the following changes to this site: [Numbers in Dart]: /guides/language/numbers [streams tutorial]: /tutorials/language/streams [typedef section]: /language/typedefs -[Using Google APIs]: /guides/google-apis +[Using Google APIs]: /resources/google-apis [Using Google Cloud]: /server/google-cloud -[Writing package pages]: /guides/libraries/writing-package-pages +[Writing package pages]: /tools/pub/writing-package-pages ### Articles added to the Dart blog {:.no_toc} diff --git a/src/content/libraries/index.md b/src/content/libraries/index.md index bee5d7504b..c94e5b9232 100644 --- a/src/content/libraries/index.md +++ b/src/content/libraries/index.md @@ -19,7 +19,7 @@ working on collections of objects (`dart:collection`), making calculations (`dart:math`), and encoding/decoding data (`dart:convert`). Additional APIs are available in -[commonly used packages](/guides/libraries/useful-libraries). +[commonly used packages](/resources/useful-packages). ## Library tour diff --git a/src/content/overview.md b/src/content/overview.md index 1d79ed05c7..dcc8b7a284 100644 --- a/src/content/overview.md +++ b/src/content/overview.md @@ -171,8 +171,8 @@ publish thousands of packages, with support for features like these: To see a series of working examples featuring the Dart core libraries, read the [core library documentation](/libraries). -To find additional APIs, see the -[commonly used packages page](/guides/libraries/useful-libraries). +To find additional APIs, check out the +[commonly used packages page](/resources/useful-packages). ## Dart: The platforms {:#platform} diff --git a/src/content/guides/language/coming-from/js-to-dart.md b/src/content/resources/coming-from/js-to-dart.md similarity index 100% rename from src/content/guides/language/coming-from/js-to-dart.md rename to src/content/resources/coming-from/js-to-dart.md diff --git a/src/content/guides/language/coming-from/swift-to-dart.md b/src/content/resources/coming-from/swift-to-dart.md similarity index 100% rename from src/content/guides/language/coming-from/swift-to-dart.md rename to src/content/resources/coming-from/swift-to-dart.md diff --git a/src/content/guides/google-apis.md b/src/content/resources/google-apis.md similarity index 100% rename from src/content/guides/google-apis.md rename to src/content/resources/google-apis.md diff --git a/src/content/guides/libraries/useful-libraries.md b/src/content/resources/useful-packages.md similarity index 98% rename from src/content/guides/libraries/useful-libraries.md rename to src/content/resources/useful-packages.md index 041e2f1ad8..29f8e27ccd 100644 --- a/src/content/guides/libraries/useful-libraries.md +++ b/src/content/resources/useful-packages.md @@ -1,6 +1,7 @@ --- title: Commonly used packages -description: Some of the most useful and popular packages, and where you can learn more. +description: >- + Some of the most useful and popular packages, and where you can learn more. --- {% assign pub = site.pub %} diff --git a/src/content/server/google-cloud.md b/src/content/server/google-cloud.md index 61de79ae15..1159217da0 100644 --- a/src/content/server/google-cloud.md +++ b/src/content/server/google-cloud.md @@ -13,7 +13,7 @@ For information about creating HTTP servers with Dart, see the For information about other Google APIs (including Firebase) that you might want to use from Dart code, -see the [Google APIs page](/guides/google-apis). +see the [Google APIs page](/resources/google-apis). ## Recommended solutions diff --git a/src/content/server/libraries.md b/src/content/server/libraries.md index e7a0a89611..657853fcdb 100644 --- a/src/content/server/libraries.md +++ b/src/content/server/libraries.md @@ -63,5 +63,5 @@ and [general-purpose packages][] such as `logging`: {:.table .table-striped .nowrap} -[general-purpose packages]: /guides/libraries/useful-libraries#general-purpose-packages +[general-purpose packages]: /resources/useful-packages#general-purpose-packages [gRPC]: https://grpc.io/ diff --git a/src/content/tools/pub/package-layout.md b/src/content/tools/pub/package-layout.md index 20efaab140..cb8d2ac5d7 100644 --- a/src/content/tools/pub/package-layout.md +++ b/src/content/tools/pub/package-layout.md @@ -122,7 +122,7 @@ is shown—rendered as [Markdown][]—on the page for your package. This is the perfect place to introduce people to your code. For guidance on how to write a great README, see -[Writing package pages](/guides/libraries/writing-package-pages). +[Writing package pages](/tools/pub/writing-package-pages). ## CHANGELOG.md {:#changelog} diff --git a/src/content/tools/pub/publishing.md b/src/content/tools/pub/publishing.md index 73c77374bc..7f90e1d149 100644 --- a/src/content/tools/pub/publishing.md +++ b/src/content/tools/pub/publishing.md @@ -82,7 +82,7 @@ The following files affect the contents of your package's web page. your package's web page. The file's contents should be marked up using [Markdown][]. To learn how to write a great README, see - [Writing package pages](/guides/libraries/writing-package-pages). + [Writing package pages](/tools/pub/writing-package-pages). **`CHANGELOG.md`** : If found, this file populates its own tab on your package's web page. diff --git a/src/content/guides/libraries/writing-package-pages.md b/src/content/tools/pub/writing-package-pages.md similarity index 99% rename from src/content/guides/libraries/writing-package-pages.md rename to src/content/tools/pub/writing-package-pages.md index 6976aab6ca..0a215a3f2e 100644 --- a/src/content/guides/libraries/writing-package-pages.md +++ b/src/content/tools/pub/writing-package-pages.md @@ -395,14 +395,14 @@ see these resources: [README Checklist][] : A checklist for writing a README that -helps readers feel confident about your project. + helps readers feel confident about your project. [Awesome README][] : A curated, annotated list of great READMEs. [Make a README][] : An introduction to READMEs, -with a template and suggestions for a good README. + with a template and suggestions for a good README. [How to write a great README for your GitHub project][] : Key elements of a good README, and a template. diff --git a/src/content/tutorials/server/httpserver.md b/src/content/tutorials/server/httpserver.md index 01b50ef0a1..eefc6798ec 100644 --- a/src/content/tutorials/server/httpserver.md +++ b/src/content/tutorials/server/httpserver.md @@ -35,5 +35,5 @@ Dart resources for writing HTTP servers include: [`shelf_router`]: {{site.pub-pkg}}/shelf_router [`shelf_static`]: {{site.pub-pkg}}/shelf_static [simple-sample]: {{site.repo.dart.org}}/samples/tree/main/server/simple -[Using Google APIs]: /guides/google-apis +[Using Google APIs]: /resources/google-apis [Using Google Cloud]: /server/google-cloud