Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f03dffd
Begin migration to Jaspr and Jaspr Content
parlough Oct 14, 2025
c25d64d
Merge branch 'main' into feat/jaspr-migration
parlough Oct 15, 2025
e1d6c6e
Skip inline highlight spans when noHighlight is specified
parlough Oct 15, 2025
8344106
Fix incorrect rename of captioned-image
parlough Oct 15, 2025
7240e6a
Fix video start time extraction
parlough Oct 15, 2025
b307cf7
Upgrade Jaspr and remove unused dependencies
parlough Oct 15, 2025
cdab38d
Update /f/devtools-releases.json for new Markdown location
parlough Oct 15, 2025
6ce0926
Remove tabs.js as the logic has already been migrated
parlough Oct 15, 2025
6867359
Fix code block attributes without value
parlough Oct 15, 2025
6d686a3
Refresh excerpts and update command references
parlough Oct 15, 2025
8392adf
Update Cloud Build stage and deploy configuration
parlough Oct 15, 2025
c20d32c
Directly migrate widget catalog pages and speed up release note rende…
parlough Oct 16, 2025
c0c0440
Add timeout to build and check links workflow
parlough Oct 16, 2025
42dd92d
Update emulator port in firebase.json to match tool
parlough Oct 16, 2025
5c6eefb
Apply suggestion about setting keepSuffixPattern
parlough Oct 16, 2025
ac36bbe
Don't let Jaspr add a base element to the head
parlough Oct 16, 2025
31bfca3
Fix a few broken fragments
parlough Oct 16, 2025
e10882c
Ensure header IDs are unique per page
parlough Oct 16, 2025
35e4322
add jaspr badge to footer
schultek Oct 17, 2025
9094050
Migrate DartPad injection to Jaspr (#12559)
schultek Oct 18, 2025
9184fdf
Merge branch 'main' into feat/jaspr-migration
parlough Oct 20, 2025
8e8b71c
Migrate `osSelector` shortcode to Jaspr (#12560)
schultek Oct 20, 2025
62da1f9
Move over latest updates from dart.dev
parlough Oct 20, 2025
ebecb4b
Update DevTools releases data
parlough Oct 20, 2025
b1e55f9
Reassign header IDs to be unique one
parlough Oct 20, 2025
2874aea
Mark MaterialIcon as hidden if it has no label
parlough Oct 20, 2025
29695d6
feat: migrate expansion list to jaspr (#12567)
schultek Oct 20, 2025
8f8f751
Merge branch 'main' into feat/jaspr-migration
parlough Oct 20, 2025
9a41ee4
Fix lints
parlough Oct 20, 2025
6408b89
Merge branch 'main' into feat/jaspr-migration
parlough Oct 20, 2025
0f77997
Workaround broken link for now
parlough Oct 20, 2025
e9ceaa7
Migrate styles hash builder from dart.dev
parlough Oct 20, 2025
5b179ee
feat: migrate archive table to jaspr (#12568)
schultek Oct 21, 2025
ca52b97
Update package:opal for addditional language support
parlough Oct 21, 2025
89a05c9
Fix a few build issues
parlough Oct 21, 2025
337a7a5
Fix cookie notice styles
parlough Oct 21, 2025
8c412a5
Remove unused SDK channel in site.yml file
parlough Oct 20, 2025
c79c8e8
Migrate client interactivity of learning resource index (#12578)
schultek Oct 22, 2025
f33f6df
feat: migrate devtools releases (#12585)
schultek Oct 22, 2025
c81ca87
Merge branch 'main' into feat/jaspr-migration
parlough Oct 22, 2025
db385b6
Simplify breadcrumb of DevTools release notes
parlough Oct 22, 2025
94f72b0
Add back support for hiddenChildren to sidenav
parlough Oct 22, 2025
011043a
Use shared MaterialIcon component where possible
parlough Oct 22, 2025
2b2a3ef
Hide a few language tags in code blocks
parlough Oct 22, 2025
6d5d1c3
Add back support for diff attribute to code block processing
parlough Oct 22, 2025
de77496
feat: migrate figure and captioned images to jaspr (#12586)
schultek Oct 22, 2025
5a240ca
Migrate remaining logic from `main.js` to Dart (#12587)
schultek Oct 22, 2025
f70d887
Fix image link on ios-app-clip page
parlough Oct 22, 2025
7e9e19a
Add back support for the banner with customization
parlough Oct 22, 2025
c2bae4c
Clarify why Node is includes in dev.nix file
parlough Oct 22, 2025
9195ab9
feat: organize components (#12588)
schultek Oct 22, 2025
8ed1d61
Fix definition list on integration testing page
parlough Oct 22, 2025
da1733d
Add support for full width YouTubeEmbed
parlough Oct 22, 2025
cbc99cb
Move sidenav active entry scrollTo logic to HTML file
parlough Oct 22, 2025
3e2302d
Add attributes to root html element
parlough Oct 22, 2025
8d3eed7
Remove unnecessary tabindex on Skip to main button
parlough Oct 22, 2025
074129b
Merge branch 'main' into feat/jaspr-migration
parlough Oct 23, 2025
d061a01
Add blog to site switcher
parlough Oct 24, 2025
bb09726
Merge branch 'main' into feat/jaspr-migration
parlough Oct 24, 2025
2271f2f
fix changelog render instruction
schultek Oct 27, 2025
c40694e
Replace rest of breaking change include renders as well
parlough Oct 27, 2025
a0b4e89
Merge branch 'main' into feat/jaspr-migration
parlough Oct 27, 2025
5dd6b02
fix showing initial active tab
schultek Oct 27, 2025
65621fb
fix broken render directives due to escaped quotes
schultek Oct 27, 2025
45b46e3
Add basic support for C and C++ syntax highlighting
parlough Oct 27, 2025
a05b3de
Allow text selection on text buttons
parlough Oct 27, 2025
716095e
Merge branch 'main' into feat/jaspr-migration
parlough Oct 27, 2025
bc6c788
Fix and improve app architecture recommendations page
parlough Oct 27, 2025
032466e
Only include scrollbar if necessary
parlough Oct 27, 2025
53a8a0c
Allow customizing a tabs' ID
parlough Oct 27, 2025
afaf5a7
Fix support for previous and next page buttons
parlough Oct 27, 2025
2a0207d
Merge branch 'main' into feat/jaspr-migration
parlough Oct 27, 2025
6885672
Tighten SDK and dependency constraints
parlough Oct 28, 2025
0d3f92c
Fix firebase project reference in Cloud Build deploy workflow
parlough Oct 28, 2025
a7bb5a8
Minor cleanup from lint suggestions
parlough Oct 28, 2025
70094ef
Use higher JS optimization level in release builds
parlough Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 1 addition & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,11 @@ updates:
- "auto.dependencies"
- "auto.github-action"
- "lang.yaml"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "production"
labels:
- "auto.dependencies"
- "auto.npm"
- "lang.javascript"
- package-ecosystem: "pub"
versioning-strategy: "increase-if-necessary"
directories:
- "/"
- "/tool/flutter_site"
- "/tool/dash_site"
schedule:
interval: "daily"
labels:
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
# Declare default permissions as read only.
permissions: read-all

env:
NODE_VERSION: 22

jobs:
test:
name: Analyze and test code examples
Expand All @@ -41,13 +38,13 @@ jobs:
run: dart pub get
continue-on-error: ${{ matrix.experimental }}
- name: Check Dart code formatting
run: dart run flutter_site format-dart --check
run: dart run dash_site format-dart --check
continue-on-error: ${{ matrix.experimental }}
- name: Analyze Dart code
run: dart run flutter_site analyze-dart
run: dart run dash_site analyze-dart
continue-on-error: ${{ matrix.experimental }}
- name: Run Dart tests
run: dart run flutter_site test-dart
run: dart run dash_site test-dart
continue-on-error: ${{ matrix.experimental }}

excerpts:
Expand All @@ -62,24 +59,15 @@ jobs:
- name: Fetch Dart dependencies
run: dart pub get
- name: Check if excerpts are up to date
run: dart run flutter_site refresh-excerpts --fail-on-update --dry-run
run: dart run dash_site refresh-excerpts --fail-on-update --dry-run
continue-on-error: ${{ matrix.experimental }}

linkcheck:
name: Build site and check links
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Enable Corepack
run: npm i -g corepack@latest && corepack enable
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup pnpm
run: corepack install
- name: Install node dependencies
run: pnpm install --frozen-lockfile
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
Expand All @@ -88,11 +76,11 @@ jobs:
- name: Install firebase-tools
run: curl -sL https://firebase.tools | bash
- name: Build site
run: dart run flutter_site build
run: dart run dash_site build
- name: Check for broken Markdown link references
run: dart run flutter_site check-link-references
run: dart run dash_site check-link-references
- name: Check for broken internal links
run: dart run flutter_site check-links
run: dart run dash_site check-links

firebase-validate:
name: Validate Firebase configuration
Expand All @@ -106,4 +94,4 @@ jobs:
- name: Fetch Dart dependencies
run: dart pub get
- name: Validate the firebase.json file
run: dart run flutter_site verify-firebase-json
run: dart run dash_site verify-firebase-json
11 changes: 5 additions & 6 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.nodejs_22
pkgs.pnpm
# Node is included for deploying to Firebase.
pkgs.nodejs_24
];

# Sets environment variables in the workspace
Expand All @@ -24,7 +24,7 @@
enable = true;
previews = {
web = {
command = ["./dash_site" "serve"];
command = ["dart" "run" "dash_site" "serve"];
manager = "web";
env = {
# Environment variables to set for your server
Expand All @@ -38,12 +38,11 @@
workspace = {
# Runs when a workspace is first created
onCreate = {
pnpm-install = "pnpm install";
dart-pub-get = "dart pub get";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
dart-pub-get = "dart pub get";
};
};
};
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

163 changes: 22 additions & 141 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# [Flutter][] documentation website

The [documentation site][Flutter] for the [Flutter framework][],
built with [Eleventy][] and hosted on [Firebase][].
built with [Jaspr][] and hosted on [Firebase][].

[Flutter framework]: https://flutter.dev
[Eleventy]: https://11ty.dev/
[Jaspr]: https://jaspr.site
[Firebase]: https://firebase.google.com/

[Build Status]: https://github.com/flutter/website/workflows/build/badge.svg
Expand Down Expand Up @@ -88,12 +88,9 @@ enable an edit-refresh cycle.

### Get the prerequisites

Install the following tools to build and develop the site:
To build and develop the site, you'll need to
install the latest stable release of Flutter, which includes Dart.

#### Flutter

The latest stable release of Flutter, which includes Dart,
is required to build the site and run its tooling.
If you don't have Flutter or need to update, follow the
instructions at [Install Flutter][] or [Upgrading Flutter][].

Expand All @@ -107,28 +104,6 @@ flutter --version
[Install Flutter]: https://docs.flutter.dev/get-started
[Upgrading Flutter]: https://docs.flutter.dev/release/upgrade

#### Node.js

The **latest** stable LTS release of Node.js is required to build the site.
If you don't have Node.js or need to update, download your
computer's corresponding version and follow the instructions
from the [Node.js download archive][].
If you prefer, you can use a version manager such as [nvm][],
and run `nvm install` from the repository's root directory.

If you already have Node installed, verify it's available on your path
and already the latest stable version _(currently `22.14` or later)_:

```console
node --version
```

If your version is out of date,
follow the update instructions for how you originally installed it.

[Node.js download archive]: https://nodejs.org/en/download/
[nvm]: https://github.com/nvm-sh/nvm

### Clone this repo

If you're not a member of the Flutter organization,
Expand Down Expand Up @@ -164,103 +139,53 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
dart pub get
```

3. _Optional:_ We recommend you use `pnpm`, but you can also use `npm`.
Install `pnpm`, an alternative, efficient package manager for
npm packages. If you already have `pnpm`, verify you have the
latest stable version.

```console
node --version
```

If you don't already have `pnpm` installed, we recommend
using [`corepack`][] to install and manage `pnpm` versions,
since `corepack` is bundled with most installations of
Node. If you installed `node` using Homebrew, you'll need
to install corepack separately:

```console
brew install corepack
```

If you haven't used `corepack` before, you'll need to
first enable it with `corepack enable`.
Then, to install the correct `pnpm` version, from the
root directory of the repository, run `corepack install`:

```console
corepack enable;
corepack install
```

To install [`pnpm`][] without using `corepack`, you
can use your preferred [installation method][pnpm-install].

5. _(optional)_ Once you have `pnpm` installed and setup,
fetch the site's npm dependencies using `pnpm install`.
We highly recommend you use `pnpm`, but you can also use `npm`.

```console
pnpm install
```

Rerun `pnpm install` whenever you incorporate the
latest changes to the `main` branch or if you
experience dependency or import errors when building the site.

6. From the root directory, run the `dash_site` tool to
3. From the root directory, run the `dash_site` tool to
validate your setup and learn about the available commands.

```console
./dash_site --help
```terminal
dart run dash_site --help
```

7. From the root directory, serve the site locally.
4. From the root directory, serve the site locally.

```console
./dash_site serve
```terminal
dart run dash_site serve
```

This command generates and serves the site on a
local port that's printed to your terminal.

8. View your changes in the browser by navigating to <http://localhost:4000>.
5. View your changes in the browser by navigating to <http://localhost:8080>.

Note the port might be different if `4000` is taken.
Note the port might be different if `8080` is taken.

If you want to check the raw, generated HTML output and structure,
view the `_site` directory in a file explorer or an IDE.

9. Make your changes to the local repo.
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.
Improvements to this functionality are planned.
Please open a new issue to track the issue if this occurs.

10. Commit your changes to the branch and submit your PR.
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 `./dash_site --help` from the repository's root directory.

[`corepack`]: https://nodejs.org/api/corepack.html
[`pnpm`]: https://pnpm.io/
[pnpm-install]: https://pnpm.io/installation
> 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` or `/tool` directories,
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.

```console
./dash_site check-all
```terminal
dart run dash_site check-all
```

If this script reports any errors or warnings,
Expand All @@ -286,53 +211,9 @@ 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 `./dash_site refresh-excerpts`.
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

## [Optional] Deploy to a staging site

Submitted pull requests can be automatically staged
by a site maintainer.
If you'd like to stage the site yourself though,
you can build a full version and upload it to Firebase.

1. If you don't already have a Firebase project,

- Navigate to the [Firebase Console](https://console.firebase.google.com)
and create your own Firebase project (for example, `flutter-dev-staging`).

- Head back to your local terminal and verify that you're logged in.

```console
npm exec -- firebase-tools login
```

- Ensure that your project exists and activate that project:

```console
npm exec -- firebase-tools projects:list
npm exec -- firebase-tools use <your-project>
```

2. From the root directory of the repository, build the site:

```console
./dash_site build
```

This builds the site and copies it to your local `_site` directory.
If that directory previously existed, it will be replaced.

3. Deploy to your activated Firebase project's default hosting site:

```console
npm exec -- firebase-tools deploy --only hosting
```

4. Navigate to your PR on GitHub and include the link of the staged version.
Do consider adding a reference to the commit you staged,
so that reviewers know if any further changes have been made.
6 changes: 3 additions & 3 deletions cloud_build/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ steps:
- name: gcr.io/cloud-builders/git
args: ['fetch', '--unshallow']
- name: gcr.io/flutter-dev-230821/firebase-ghcli
# Set up, build, then deploy site to production
# Build the site, then deploy it to production.
entrypoint: '/bin/bash'
args:
- '-c'
- |-
set -e
npm install
npm run build-site-for-production
dart pub get
dart run dash_site build --release
firebase deploy --project=flutter-docs-prod --only=hosting
options:
Expand Down
4 changes: 2 additions & 2 deletions cloud_build/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ steps:
- |-
set -e
npm install
npm run build-site-for-staging
dart pub get
dart run dash_site build
cloud_build/scripts/stage_site_and_comment_on_github.sh
secretEnv: ['GH_PAT_TOKEN']
Expand Down
Loading
Loading