# website
**Repository Path**: mobile-webs/website
## Basic Information
- **Project Name**: website
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: BSD-3-Clause
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-08-08
- **Last Updated**: 2024-10-12
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# [Flutter][]'s website ![Flutter logo][]
[![Build Status][]][Repo on Travis]
## 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)
and we'll take a look.
For simple changes (such as to CSS and text), you probably don't need to build this site.
Often you can make changes using the GitHub UI.
If you want/need to build, read on.
## Before you build this site
### 1. Get the prerequisites
Install the following tools if you don't have them already.
- **bash**, the Bourne shell. These instructions assume you're using `bash` -- setup might not work if you use another shell.
- **[nvm][]**, the Node Version Manager.
- **[rvm][]**, the Ruby Version Manager.
- **[Flutter][Flutter install]**
- **[Dart SDK][Dart install]**
> IMPORTANT: Follow the installation instructions for each of the tools
carefully. In particular, configure your shell/environment so
that the tools are available in every terminal/command window you create.
### 2. Clone this repo _and_ its submodules
> NOTE: This repo has git _submodules_, which affects how you clone it.
To **clone [this repo][]**, follow the instructions given in the
GitHub help on [Cloning a repository][], and _choose one_ of the following
submodule-cloning techniques:
- Clone this repo and its submodule _at the same_, use the
`--recurse-submodules` option:
`git clone --recurse-submodules https://github.com/flutter/website.git`
- If you've already cloned this repo without its submodule, then run
this command from the repo root:
`git submodule update --init --remote`
> NOTE: At any time during development you can use the submodule command to
> refresh submodules: `git pull; git submodule update --init --remote`
### 3. Run installation scripts
> NOTE: It is safe to (re-)run all of the commands and scripts given below even
if you already have the required packages installed.
**Open a bash terminal/command window** and execute the following commands:
1. cd \ # change to
**root of this repo**
1. `source ./tool/env-set.sh` #
initialize environment variables; install/use required Node & Ruby version
1. `./tool/before-install.sh` #
install core set of required tools
1. `./tool/install.sh` #
install everything else needed to build this site
> IMPORTANT:
> - Any time you create a **new terminal/command window** to work on
> this repo, **repeat steps 1 and 2** above.
> - If you upgrade Dart then rerun all of the steps above.
## Developing
1. Create a branch.
1. Make your changes.
1. Test your changes by serving the site locally. Run either **one** of these commands:
- `./tool/serve.sh`
or
- `bundle exec jekyll serve --incremental --watch --livereload --port 4002`
**Note**: Unless you're editing files under `site-shared`, you can safely
ignore `ERROR: directory is already being watched` messages.
For details, see [#1363](https://github.com/flutter/website/issues/1363).
1. Prior to submitting, validate site links:
`./tool/shared/check-links.sh`
> TIP: Sometimes Jekyll gets confused and seems to be out-of-sync. (This might
> happen, for example, when you pull from master and lots of files have moved.)
> To fix Jekyll, stop the `serve.sh` script, remove the generated site files by
> hand, and then restart the `serve.sh` script:
>
> ```
> ^C
> $ rm -Rf ./_site/* ./.jekyll*
> $ ./tool/serve.sh
> ```
## Deploy to a staging site
You can deploy your local edits to a personal staging site as follows (steps 1 and 2 need to be done only once):
1. In the [Firebase Console](https://console.firebase.google.com),
create your own Firebase project (e.g. 'mit-flutter-staging')
1. Tell Firebase about that project with the firebase
[`use` command](https://firebase.googleblog.com/2016/07/deploy-to-multiple-environments-with.html):
```console
$ npx firebase use --add
? Which project do you want to add?