Flutter website
- Issues, bugs, and requests
- Before you submit a PR
- Before you build this site
- Setting up your local environment and serving changes
- Creating and/or editing DartPad example code
- Deploying to a staging site
- Writing for flutter.dev
We welcome contributions and feedback on our website. Please file a request in our issue tracker or create a pull request. 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, please file those issues on the flutter/flutter repo, not on this (flutter/website) repo. The API docs are embedded in Flutter's source code, so the engineering team handles those.
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— 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 or the word list, or use the search bar that's 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!
For changes beyond simple text and CSS tweaks, we recommend building the site.
Install the following tools, if you don't have them already:
- bash, the Bourne shell
These instructions assume you're usingbash
, and setup might not work if you use another shell. - GNU Make
On Windows the easiest way to install Make ischoco install make
. Other options include using a subsystem. - Docker. We use Docker for local dev, tests, and building the site. Install it from https://docs.docker.com/get-docker/.
- Firebase CLI, for hosting the site locally.
One way to get this is to run
npm install -g firebase-tools
. For full setup details, read the Firebase CLI documentation.
Note: This repo has git submodules, which affects how you clone it. The GitHub documentation has general help on forking and cloning repos.
If you are working in the Windows desktop environment,
make sure you have Git autocrlf
set to input
before initializing the submodules.
This ensures that line endings are handled correctly
before any Bash scripts are executed within the submodules.
See issue 6201 for details.
If you're outside of the Flutter organization, we recommend you create a fork of the repo under your own account, and then submit a PR from that fork.
Once you have a fork (or you're a Flutter org member), choose one of the following submodule-cloning techniques:
-
Clone the repo and its submodule at the same using the
--recurse-submodules
option:$ git clone --recurse-submodules https://github.com/<username-or-flutter>/website.git
OR
-
If you've already cloned the repo without its submodule, then run this command from the repo root:
$ git submodule update --init --recursive
Note: At any time during development you can use the
git submodule
command to refresh submodules:$ git pull; git submodule update --init --recursive