base on Flutter documentation web site [![Flutter logo]](https://docs.flutter.dev) [Flutter logo]: https://github.com/dart-lang/site-shared/blob/main/src/_assets/image/flutter/icon/64.png?raw=1 # [Flutter][] documentation website The [documentation site][Flutter] for the [Flutter framework][], built with [Jaspr][] and hosted on [Firebase][]. [Flutter framework]: https://flutter.dev [Jaspr]: https://jaspr.site [Firebase]: https://firebase.google.com/ [Build Status]: https://github.com/flutter/website/workflows/build/badge.svg [Flutter]: https://docs.flutter.dev/ [Repo on GitHub Actions]: https://github.com/flutter/website/actions?query=workflow%3Abuild+branch%3Amain <a href="https://studio.firebase.google.com/import?url=https%3A%2F%2Fgithub.com%2Fflutter%2Fwebsite"> <img height="32" alt="Open in Firebase Studio" src="https://cdn.firebasestudio.dev/btn/open_blue_32.svg"> </a> ## Issues, bugs, and requests We welcome contributions and feedback on our website. Please file a request in our [issue tracker](https://github.com/flutter/website/issues/new/choose) or create a [pull request](https://github.com/flutter/website/pulls). For simple changes (such as tweaking some text), it's easiest to make changes using the GitHub UI. If you have an issue with the API docs on [api.flutter.dev](https://api.flutter.dev), please file those issues on the [`flutter/flutter`](https://github.com/flutter/flutter/issues) repo, not on this (`flutter/website`) repo. The API docs are embedded in Flutter's source code, so the engineering team handles those. ## Before you submit a PR We love it when the community gets involved in improving our docs! But here are a few notes to keep in mind before you submit a PR: - When triaging issues, we sometimes label an issue with the tag **PRs welcome**. But we welcome PRs on other issues as well&mdash; it doesn't have to be tagged with that label. - Please don't run our docs through Grammarly (or similar) and submit those changes as a PR. - We follow the [Google Developer Documentation Style Guidelines][] — for example, don't use "i.e." or "e.g.", avoid writing in first person, and avoid writing in future tense. You can start with the [style guide highlights](https://developers.google.com/style/highlights) or the [word list](https://developers.google.com/style/word-list), or use the search bar at the top of every style guide page. > We truly thank you for your willingness and helpfulness > in keeping the website docs up to date! [Google Developer Documentation Style Guidelines]: https://developers.google.com/style ## Contributing To update this site, fork the repo, make your changes, and generate a pull request. For small, contained changes (such as style and typo fixes), you probably don't need to build this site. Often you can make changes using the GitHub UI. If needed, we can stage the changes automatically in your pull request. If your change involves code samples, adds/removes pages, or affects navigation, do consider building and testing your work before submitting. If you want or need to build the site, follow the steps below. ## Build the site For changes beyond simple text and CSS tweaks, we recommend running the site locally to enable an edit-refresh cycle. ### Get the prerequisites To build and develop the site, you'll need to install the latest stable release of Flutter, which includes Dart. If you don't have Flutter or need to update, follow the instructions at [Install Flutter][] or [Upgrading Flutter][]. If you already have Flutter installed, verify it's on your path and already the latest stable version: ```console flutter --version ``` [Install Flutter]: https://docs.flutter.dev/get-started [Upgrading Flutter]: https://docs.flutter.dev/install/upgrade ### Clone this repo If you're not a member of the Flutter organization, we recommend you [create a fork][] of this repo under your own GitHub account and then submit a pull request from that fork. Once you have a fork (or you're a Flutter org member), clone the repository with `git clone`: ```bash git clone https://github.com/flutter/website.git ``` [create a fork]: https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo ## Set up your local environment and serve changes Before you continue setting up the site infrastructure, verify the correct versions of Flutter are set up and available by following the instructions in [Get the prerequisites](#get-the-prerequisites). 1. _Optional:_ After cloning the repo, create a branch for your changes: ```console git checkout -b <BRANCH_NAME> ``` 2. From the root directory of the repository, fetch the site's Dart dependencies. ```console dart pub get ``` 3. From the root directory, run the `dash_site` tool to validate your setup and learn about the available commands. ```terminal dart run dash_site --help ``` 4. From the root directory, serve the site locally. ```terminal dart run dash_site serve ``` This command generates and serves the site on a local port that's printed to your terminal. 5. View your changes in the browser by navigating to <http://localhost:8080>. Note the port might be different if `8080` is taken. 6. Make your changes to the local repo. To view your changes in the browser, you'll need to refresh the page. The site should automatically rebuild on most changes, but if something doesn't update, exit the process and rerun the command. 7. Commit your changes to the branch and submit your PR. If your change is large, or you'd like to test it, consider [validating your changes](#validate-your-changes). > [!TIP] > To find additional commands that you can run, > run `dart run dash_site --help` from the repository's root directory. ## Validate your changes ### Check documentation and example code If you've made changes to the code in the `/examples`, `/site`, or `/tool` directories, commit your work, then run the following command to verify it is up to date and matches the site standards. ```terminal dart run dash_site check-all ``` If this script reports any errors or warnings, then address those issues and rerun the command. If you have any issues, leave a comment on your issue or pull request, and we'll try our best to help you. You can also chat with us on the `#hackers-devrel` channel on the [Flutter contributors Discord][]! [Flutter contributors Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md ### Check links If you've made changes to the content and would like to check all internal links are functional and Markdown link references are valid, build the site locally and then run the following commands. 1. Build the site locally. ```bash dart run dash_site build ``` 1. Verify all Markdown link references are resolved. ```bash dart run dash_site check-link-references ``` 1. Validate all internal links are valid. > [!NOTE] > This command relies on the `firebase` CLI tool being on your PATH. > If you haven't installed it or updated it in a while, > follow [Set up or update the Firebase CLI][firebase-install]. ```bash dart run dash_site check-links ``` If either command reports any errors or warnings, then address those issues, rebuild the site, and rerun the command. [firebase-install]: https://firebase.google.com/docs/cli#setup_update_cli ### Refresh code excerpts A build that fails with the error `Error: Some code excerpts needed to be updated!` means that one or more code excerpts in the site Markdown files aren't identical to the code regions declared in the corresponding `.dart` files. The `.dart` files are the source of truth for code snippets, and the preceding `<?code-excerpt>` instructions in Markdown files specify how the snippets are copied from the `.dart` files. To resolve this error and update the Markdown snippets to match, from the root of the `website` directory, run `dart run dash_site refresh-excerpts`. To learn more about creating, editing, and using code excerpts, check out the [excerpt updater package documentation][]. [excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/pkgs/excerpter#readme ", Assign "at most 3 tags" to the expected json: {"id":"9565","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"