{"id":13400244,"url":"https://github.com/dart-lang/site-www","last_synced_at":"2025-05-14T05:12:03.168Z","repository":{"id":37674107,"uuid":"63089994","full_name":"dart-lang/site-www","owner":"dart-lang","description":"The source for the Dart website.","archived":false,"fork":false,"pushed_at":"2025-05-12T18:26:38.000Z","size":66471,"stargazers_count":986,"open_issues_count":123,"forks_count":719,"subscribers_count":79,"default_branch":"main","last_synced_at":"2025-05-12T19:41:40.088Z","etag":null,"topics":["dart","language","website"],"latest_commit_sha":null,"homepage":"https://dart.dev","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dart-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-11T17:57:36.000Z","updated_at":"2025-05-09T18:07:40.000Z","dependencies_parsed_at":"2023-10-16T23:58:55.069Z","dependency_job_id":"7c4f0ab3-3a66-455d-ace8-8073ce1d5a96","html_url":"https://github.com/dart-lang/site-www","commit_stats":{"total_commits":3898,"total_committers":383,"mean_commits":"10.177545691906005","dds":0.7514109799897384,"last_synced_commit":"09a6b34b3d627d1ed1b26d03d1e386539714b9cd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fsite-www","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fsite-www/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fsite-www/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fsite-www/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dart-lang","download_url":"https://codeload.github.com/dart-lang/site-www/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","language","website"],"created_at":"2024-07-30T19:00:49.882Z","updated_at":"2025-05-14T05:11:58.152Z","avatar_url":"https://github.com/dart-lang.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":["Misc"],"readme":"# \u003cimg src=\"https://github.com/dart-lang/site-shared/blob/main/src/_assets/image/dart/logo/64.png\" alt=\"Dart\" width=\"28\" height=\"28\"/\u003e The Dart language site (dart.dev)\n\n[![Build Status SVG][]][Repo on GitHub Actions]\n[![OpenSSF Scorecard SVG][]][Scorecard Results]\n\n\u003ca href=\"https://idx.google.com/import?url=https%3A%2F%2Fgithub.com%2Fdart-lang%2Fsite-www\"\u003e\n  \u003cpicture\u003e\n    \u003csource\n      media=\"(prefers-color-scheme: dark)\"\n      srcset=\"https://cdn.idx.dev/btn/open_dark_32.svg\"\u003e\n    \u003csource\n      media=\"(prefers-color-scheme: light)\"\n      srcset=\"https://cdn.idx.dev/btn/open_light_32.svg\"\u003e\n    \u003cimg\n      height=\"32\"\n      alt=\"Open in IDX\"\n      src=\"https://cdn.idx.dev/btn/open_purple_32.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\nThe documentation site for the [Dart programming language](https://dart.dev), \nbuilt with [Eleventy][] and hosted on [Firebase][].\n\nWe welcome contributions of all kinds!\nTo set up the site locally, follow the\nbelow guidelines on [Building the site](#build-the-site).\nTo learn more about contributing to this repository,\ncheck out the [Contributing guidelines](CONTRIBUTING.md).\n\n## Getting started\n\nStart by looking for an [issue](https://github.com/dart-lang/site-www/issues)\nthat catches your interest, or create an issue with your proposed change.\nConsider adding a comment to let everyone know that you're working on it, and\nfeel free to ask any questions you have on the same issue.\n\nTo update this site, fork the repo, make your changes,\nand generate a pull request.\nFor small, contained changes (such as style and typo fixes),\nyou probably don't need to build this site.\nOften you can make changes using the GitHub UI.\nWe can stage the changes automatically in your pull request.\n\n\u003e [!IMPORTANT]  \n\u003e If you are cloning this repository locally,\n\u003e follow the below instruction on cloning with its submodule.\n\nIf your change involves code samples, adds/removes pages, or affects navigation,\ndo consider building and testing your work before submitting.\n\nIf you want or need to build the site, follow the steps below.\n\n## Build the site\n\nFor changes beyond simple text and CSS tweaks,\nwe recommend running the site locally to\nenable an edit-refresh cycle. \n\n### Get the prerequisites\n\nInstall the following tools to build and develop the site:\n\n#### Dart\n\nThe latest stable release of Dart is required to build the site\nand run its tooling. This can be the Dart included in the Flutter SDK.\nIf you don't have Dart or need to update, follow the\ninstructions at [Get the Dart SDK][].\n\nIf you already have Dart installed, verify it's on your path\nand already the latest stable version:\n\n```terminal\ndart --version\n```\n\n#### Node.js\n\nThe **latest** stable LTS release of Node.js is required to build the site.\nIf you don't have Node.js or need to update, download your\ncomputer's corresponding version and follow the instructions\nfrom the [Node.js download archive][].\nIf you prefer, you can use a version manager such as [nvm][],\nand run `nvm install` from the repository's root directory.\n\nIf you already have Node installed, verify it's available on your path\nand already the latest stable version _(currently `22.12` or later)_:\n\n```terminal\nnode --version\n```\n\nIf your version is out of date,\nfollow the update instructions for how you originally installed it.\n\n[Get the Dart SDK]: https://dart.dev/get-dart\n[Node.js download archive]: https://nodejs.org/en/download/\n[nvm]: https://github.com/nvm-sh/nvm\n\n### Clone this repo and its submodules\n\n\u003e [!NOTE]\n\u003e This repository has git _submodules_, which affects how you clone it.\n\u003e The GitHub documentation has general help on\n\u003e [forking][] and [cloning][] repos.\n\nIf you're not a member of the Dart organization,\nwe recommend you **create a fork** of this repo under your own account,\nand then submit a PR from that fork.\n\nOnce you have a fork (or you're a Dart org member),\n_choose one_ of the following submodule-cloning techniques:\n\n1. Clone the repo and its submodule at the same time\n   using the `--recurse-submodules` option:\n\n   ```terminal\n   git clone --recurse-submodules https://github.com/dart-lang/site-www.git\n   ```\n\n2. If you've already cloned the repo without its submodule,\n   then run this command from the root of the repository:\n\n   ```terminal\n   git submodule update --init --recursive\n   ```\n\n\u003e [!NOTE]\n\u003e At any time during development\n\u003e you can use the `git submodule` command to refresh submodules:\n\u003e\n\u003e ```terminal\n\u003e git pull \u0026\u0026 git submodule update --init --recursive\n\u003e ```\n\n## Set up your local environment and serve changes\n\nBefore you continue setting up the site infrastructure,\nverify the correct versions of Dart and Node.js are set up and available by\nfollowing the instructions in [Get the prerequisites](#get-the-prerequisites).\n\n1. _Optional:_ After cloning the repo and its submodules,\n   create a branch for your changes:\n\n   ```terminal\n   git checkout -b \u003cBRANCH_NAME\u003e\n   ```\n\n2. From the root directory of the repository,\n   fetch the site's Dart dependencies.\n\n   ```terminal\n   dart pub get\n   ```\n\n3. Install [`pnpm`][] using your preferred [installation method][pnpm-install].\n   `pnpm` is an alternative, efficient package manager for npm packages.\n   If you already have `pnpm`, verify you have the latest stable version.\n   We recommend using [`corepack`][] to install and manage `pnpm` versions,\n   since it is bundled with most installations of Node.\n\n   If you haven't used `corepack` before, you'll need to\n   first enable it with `corepack enable`.\n   Then, to install the correct `pnpm` version, from the\n   root directory of the repository, run `corepack install`:\n\n   ```terminal\n   corepack enable\n   corepack install\n   ```\n\n4. Once you have `pnpm` installed and setup,\n   fetch the site's npm dependencies using `pnpm install`.\n   We highly recommend you use `pnpm`, but you can also use `npm`.\n\n   ```terminal\n   pnpm install\n   ```\n\n5. From the root directory, run the `dash_site` tool to\n   validate your setup and learn about the available commands.\n\n   ```terminal\n   ./dash_site --help\n   ```\n\n6. From the root directory, serve the site locally.\n\n   ```terminal\n   ./dash_site serve\n   ```\n\n   This command generates and serves the site on a\n   local port that's printed to your terminal.\n\n7. View your changes in the browser by navigating to \u003chttp://localhost:4000\u003e.\n\n   Note the port might be different if `4000` is taken.\n\n   If you want to check the raw, generated HTML output and structure,\n   view the `_site` directory in a file explorer or an IDE.\n\n8. Make your changes to the local repo.\n\n   The site should automatically rebuild on most changes, but if\n   something doesn't update, exit the process and rerun the command.\n   Improvements to this functionality are planned.\n   Please open a new issue to track the issue if this occurs.\n\n9. Commit your changes to the branch and submit your PR.\n\n   If your change is large, or you'd like to test it,\n   consider [validating your changes](#validate-your-changes).\n\n\u003e [!TIP]\n\u003e To find additional commands that you can run,\n\u003e run `./dash_site --help` from the repository's root directory.\n\n[`corepack`]: https://nodejs.org/api/corepack.html\n[`pnpm`]: https://pnpm.io/\n[pnpm-install]: https://pnpm.io/installation\n\n## Validate your changes\n\n### Check documentation and example code\n\nIf you've made changes to the code in the `/examples` or `/tool` directories,\ncommit your work, then run the following command to\nverify it is up to date and matches the site standards.\n\n```terminal\n./dash_site check-all\n```\n\nIf this script reports any errors or warnings,\nthen address those issues and rerun the command.\nIf you have any issues, leave a comment on your issue or pull request,\nand we'll try our best to help you.\nYou can also chat with us on the `#hackers-devrel` channel\non the [Flutter contributors Discord][]!\n\n[Flutter contributors Discord]: https://github.com/flutter/flutter/wiki/Chat\n\n### Refresh code excerpts\n\nA build that fails with the error\n`Error: Some code excerpts needed to be updated!`\nmeans that one or more code excerpts in the site Markdown files\naren't identical to the code regions declared\nin the corresponding `.dart` files.\n\nTo resolve this error,\nfrom the root of the `site-www` directory,\nrun `./dash_site refresh-excerpts`.\n\nTo learn more about creating, editing, and using code excerpts,\ncheck out the [excerpt updater package documentation][].\n\n[excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/pkgs/excerpter#readme\n\n## [Optional] Deploy to a staging site\n\nA site maintainer can automatically stage submitted pull requests.\nIf you'd like to first stage the site yourself,\nyou can build a full version and upload it to Firebase.\n\n1. If you don't already have a Firebase project,\n\n   - Navigate to the [Firebase Console](https://console.firebase.google.com)\n     and create your own Firebase project (for example, `dart-dev-staging`).\n\n   - Head back to your local terminal and verify that you're logged in.\n\n     ```terminal\n     firebase login\n     ```\n\n   - Ensure that your project exists and activate that project:\n\n     ```terminal\n     firebase projects:list\n     firebase use \u003cyour-project\u003e\n     ```\n\n2. From the root directory of the repository, build the site:\n\n   ```terminal\n   ./dash_site build\n   ```\n\n   This builds the site and copies it to your local `_site` directory.\n   If that directory previously existed, it will be replaced.\n\n3. Deploy to your activated Firebase project's default hosting site:\n\n   ```terminal\n   firebase deploy --only hosting\n   ```\n\n4. Navigate to your PR on GitHub and include the link of the staged version.\n   Do consider adding a reference to the commit you staged,\n   so that reviewers know if any further changes have been made.\n\n\n[Build Status SVG]: https://github.com/dart-lang/site-www/workflows/build/badge.svg\n[OpenSSF Scorecard SVG]: https://api.securityscorecards.dev/projects/github.com/dart-lang/site-www/badge\n[Scorecard Results]: https://deps.dev/project/github/dart-lang%2Fsite-www\n[cloning]: https://docs.github.com/repositories/creating-and-managing-repositories/cloning-a-repository\n[Eleventy]: https://www.11ty.dev/\n[Firebase]: https://firebase.google.com/\n[forking]: https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo\n[Repo on GitHub Actions]: https://github.com/dart-lang/site-www/actions?query=workflow%3Abuild+branch%3Amain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-lang%2Fsite-www","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdart-lang%2Fsite-www","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-lang%2Fsite-www/lists"}