Skip to content

Commit e47d8a6

Browse files
[Docs] - Updated docs website to use shared website assets
1 parent 96ea889 commit e47d8a6

30 files changed

+117
-586
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
</a>
99
</p>
1010

11+
<br><br>
12+
13+
<p align="center">Check out our <a href="https://flutter-bounty-hunters.github.io/golden_bricks/" target="_blank">Usage Guide</a></p>
14+
1115
---
1216

1317
# Golden Bricks Font

doc/website/bin/golden_bricks_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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

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

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

doc/website/source/_includes/layouts/homepage.jinja

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

doc/website/source/images/branding/dart-logo.svg

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

doc/website/source/images/branding/flutter-logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
-4.11 KB
Binary file not shown.
-11.1 KB
Binary file not shown.
-3.56 KB
Binary file not shown.

0 commit comments

Comments
 (0)