Skip to content

Commit ff09049

Browse files
[Docs] - Migrated to centrally shared doc website assets
1 parent a8828bf commit ff09049

32 files changed

+131
-659
lines changed

doc/website/bin/flutter_test_robots_docs.dart

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ import 'package:static_shock/static_shock.dart';
55
Future<void> main(List<String> arguments) async {
66
// Configure the static website generator.
77
final staticShock = StaticShock()
8-
// Here, you can directly hook into the StaticShock pipeline. For example,
9-
// you can copy an "images" directory from the source set to build set:
8+
// Pick source files.
109
..pick(DirectoryPicker.parse("images"))
11-
// All 3rd party behavior is added through plugins, even the behavior
12-
// shipped with Static Shock.
10+
..pickRemote(
11+
layouts: _remoteLayouts,
12+
components: _remoteComponents,
13+
assets: _remoteAssets,
14+
)
15+
// Add all needed plugins.
1316
..plugin(const MarkdownPlugin())
1417
..plugin(const JinjaPlugin())
1518
..plugin(const PrettyUrlsPlugin())
@@ -30,3 +33,80 @@ Future<void> main(List<String> arguments) async {
3033
// Generate the static website.
3134
await staticShock.generateSite();
3235
}
36+
37+
final _remoteLayouts = <RemoteIncludeSource>{
38+
// Main page layout.
39+
RemoteInclude(
40+
url:
41+
"https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/_includes/layouts/homepage.jinja?raw=true",
42+
name: "homepage",
43+
),
44+
};
45+
46+
final _remoteComponents = <RemoteIncludeSource>{
47+
// Contributors component (used by main page layout).
48+
RemoteInclude(
49+
url:
50+
"https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/_includes/components/contributors.jinja?raw=true",
51+
name: "contributors",
52+
),
53+
};
54+
55+
final _remoteAssets = <RemoteFileSource>{
56+
// Sass styles.
57+
HttpFileGroup.fromUrlTemplate(
58+
"https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/styles/\$",
59+
buildDirectory: "styles/",
60+
files: {
61+
"theme.scss",
62+
"homepage.scss",
63+
},
64+
),
65+
66+
// Flutter and Dart logos.
67+
RemoteFile(
68+
url:
69+
"https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/images/google/dart-logo.svg?raw=true",
70+
buildPath: FileRelativePath("images/branding/", "dart-logo", "svg"),
71+
),
72+
RemoteFile(
73+
url:
74+
"https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/images/google/flutter-logo.svg?raw=true",
75+
buildPath: FileRelativePath("images/branding/", "flutter-logo", "svg"),
76+
),
77+
78+
// Dart Favicons.
79+
HttpFileGroup.fromUrlTemplate(
80+
"https://github.com/Flutter-Bounty-Hunters/fbh_branding/blob/main/single-page-doc-sites/images/google/dart-favicon/\$?raw=true",
81+
buildDirectory: "images/favicon/dart/",
82+
files: {
83+
"android-chrome-192x192.png",
84+
"android-chrome-512x512.png",
85+
"apple-touch-icon.png",
86+
"browserconfig.xml",
87+
"favicon-16x16.png",
88+
"favicon-32x32.png",
89+
"favicon.ico",
90+
"mstile-150x150.png",
91+
"site.webmanifest",
92+
},
93+
),
94+
95+
// Flutter Favicons.
96+
HttpFileGroup.fromUrlTemplate(
97+
"https://github.com/Flutter-Bounty-Hunters/fbh_branding/blob/main/single-page-doc-sites/images/google/flutter-favicon/\$?raw=true",
98+
buildDirectory: "images/favicon/flutter/",
99+
files: {
100+
"android-chrome-192x192.png",
101+
"android-chrome-512x512.png",
102+
"apple-touch-icon.png",
103+
"browserconfig.xml",
104+
"favicon-16x16.png",
105+
"favicon-32x32.png",
106+
"favicon.ico",
107+
"mstile-150x150.png",
108+
"safari-pinned-tab.svg",
109+
"site.webmanifest",
110+
},
111+
),
112+
};

doc/website/pubspec.lock

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ packages:
2626
dependency: transitive
2727
description:
2828
name: archive
29-
sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b"
29+
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
3030
url: "https://pub.dev"
3131
source: hosted
32-
version: "3.6.0"
32+
version: "3.6.1"
3333
args:
3434
dependency: transitive
3535
description:
@@ -106,10 +106,10 @@ packages:
106106
dependency: transitive
107107
description:
108108
name: collection
109-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
109+
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
110110
url: "https://pub.dev"
111111
source: hosted
112-
version: "1.18.0"
112+
version: "1.19.0"
113113
convert:
114114
dependency: transitive
115115
description:
@@ -234,10 +234,10 @@ packages:
234234
dependency: transitive
235235
description:
236236
name: http_parser
237-
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
237+
sha256: "40f592dd352890c3b60fec1b68e786cefb9603e05ff303dbc4dda49b304ecdf4"
238238
url: "https://pub.dev"
239239
source: hosted
240-
version: "4.0.2"
240+
version: "4.1.0"
241241
intl:
242242
dependency: transitive
243243
description:
@@ -402,10 +402,10 @@ packages:
402402
dependency: transitive
403403
description:
404404
name: platform
405-
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
405+
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
406406
url: "https://pub.dev"
407407
source: hosted
408-
version: "3.1.4"
408+
version: "3.1.5"
409409
pool:
410410
dependency: transitive
411411
description:
@@ -466,18 +466,18 @@ packages:
466466
dependency: transitive
467467
description:
468468
name: sass
469-
sha256: f4c860d2d44eb83ac635a7d883bb39fed071219a1b77679e7aaa080747da6c0c
469+
sha256: "0303cb84a5655e72f6e2442f0ae4c8f7068f2c97a3ed60e582cd59c7c37a13b2"
470470
url: "https://pub.dev"
471471
source: hosted
472-
version: "1.77.4"
472+
version: "1.77.8"
473473
shelf:
474474
dependency: transitive
475475
description:
476476
name: shelf
477-
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
477+
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
478478
url: "https://pub.dev"
479479
source: hosted
480-
version: "1.4.1"
480+
version: "1.4.2"
481481
shelf_packages_handler:
482482
dependency: transitive
483483
description:
@@ -537,10 +537,11 @@ packages:
537537
static_shock:
538538
dependency: "direct main"
539539
description:
540-
path: "/Users/matt/Projects/static_shock/packages/static_shock"
541-
relative: false
542-
source: path
543-
version: "0.0.5"
540+
name: static_shock
541+
sha256: "213b15e6da8c61c67d72d2aa1573f1fa4c6ecbb9eeb8c0af8d478cfdc2f41348"
542+
url: "https://pub.dev"
543+
source: hosted
544+
version: "0.0.9"
544545
stream_channel:
545546
dependency: transitive
546547
description:
@@ -561,10 +562,10 @@ packages:
561562
dependency: transitive
562563
description:
563564
name: string_scanner
564-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
565+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
565566
url: "https://pub.dev"
566567
source: hosted
567-
version: "1.2.0"
568+
version: "1.3.0"
568569
term_glyph:
569570
dependency: transitive
570571
description:
@@ -577,26 +578,26 @@ packages:
577578
dependency: "direct dev"
578579
description:
579580
name: test
580-
sha256: d11b55850c68c1f6c0cf00eabded4e66c4043feaf6c0d7ce4a36785137df6331
581+
sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f"
581582
url: "https://pub.dev"
582583
source: hosted
583-
version: "1.25.5"
584+
version: "1.25.8"
584585
test_api:
585586
dependency: transitive
586587
description:
587588
name: test_api
588-
sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794"
589+
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
589590
url: "https://pub.dev"
590591
source: hosted
591-
version: "0.7.1"
592+
version: "0.7.3"
592593
test_core:
593594
dependency: transitive
594595
description:
595596
name: test_core
596-
sha256: "4d070a6bc36c1c4e89f20d353bfd71dc30cdf2bd0e14349090af360a029ab292"
597+
sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d"
597598
url: "https://pub.dev"
598599
source: hosted
599-
version: "0.6.2"
600+
version: "0.6.5"
600601
test_process:
601602
dependency: transitive
602603
description:
@@ -625,10 +626,10 @@ packages:
625626
dependency: transitive
626627
description:
627628
name: vm_service
628-
sha256: "360c4271613beb44db559547d02f8b0dc044741d0eeb9aa6ccdb47e8ec54c63a"
629+
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
629630
url: "https://pub.dev"
630631
source: hosted
631-
version: "14.2.3"
632+
version: "14.2.4"
632633
watcher:
633634
dependency: transitive
634635
description:

doc/website/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
sdk: ^3.0.0
88

99
dependencies:
10-
static_shock: any
10+
static_shock: ^0.0.9
1111

1212
dev_dependencies:
1313
lints: ^2.0.0

doc/website/source/_includes/components/code_two_column.jinja

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="container">
2-
<div class="row">
3-
<div class="col-md-6 col-sm-12">
4-
<h3>With Flutter Test Robots</h3>
5-
<pre><code>testWidgets((tester) async {
2+
<div class="row">
3+
<div class="col-md-6 col-sm-12">
4+
<h3>With Flutter Test Robots</h3>
5+
<pre><code>testWidgets((tester) async {
66
// Setup the test.
77

88
// Press CMD+V (like for a paste).
@@ -13,11 +13,11 @@
1313

1414
// Verify expectations.
1515
});
16-
</code></pre>
17-
</div>
18-
<div class="col-md-6 col-sm-12">
19-
<h3>With Flutter</h3>
20-
<pre><code>testWidgets((tester) async {
16+
</code></pre>
17+
</div>
18+
<div class="col-md-6 col-sm-12">
19+
<h3>With Flutter</h3>
20+
<pre><code>testWidgets((tester) async {
2121
// Setup the test.
2222

2323
// Press CMD+V (like for a paste).
@@ -50,7 +50,7 @@
5050

5151
// Verify expectations.
5252
});
53-
</code></pre>
54-
</div>
55-
</div>
53+
</code></pre>
54+
</div>
55+
</div>
5656
</div>

doc/website/source/_includes/components/contributors.jinja

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)