Skip to content

Commit 04ff50c

Browse files
[Docs] - Configuring website base path
1 parent fe6a638 commit 04ff50c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

doc/website/bin/main.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import 'package:static_shock/static_shock.dart';
44

55
Future<void> main(List<String> arguments) async {
66
// Configure the static website generator.
7-
final staticShock = StaticShock()
7+
final staticShock = StaticShock(
8+
site: !arguments.contains("local") //
9+
? SiteMetadata(basePath: "/flutter-bounty-hunters/")
10+
: SiteMetadata(basePath: "/"),
11+
)
812
// Here, you can directly hook into the StaticShock pipeline. For example,
913
// you can copy an "images" directory from the source set to build set:
1014
..pick(DirectoryPicker.parse("images"))
@@ -15,20 +19,16 @@ Future<void> main(List<String> arguments) async {
1519
..plugin(const PrettyUrlsPlugin())
1620
..plugin(const RedirectsPlugin())
1721
..plugin(const SassPlugin())
18-
1922
..plugin(const PubPackagePlugin({
2023
"flutter_test_goldens",
2124
}))
22-
23-
2425
..plugin(
2526
GitHubContributorsPlugin(
2627
// To load the contributors for a given GitHub package using credentials,
2728
// place your GitHub API token in an environment variable with the following name.
2829
authToken: Platform.environment["github_doc_website_token"],
2930
),
3031
)
31-
3232
..plugin(DraftingPlugin(
3333
showDrafts: arguments.contains("preview"),
3434
));

doc/website/pubspec.yaml

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

99
dependencies:
10-
static_shock: any
10+
static_shock:
11+
git:
12+
url: https://github.com/flutter-bounty-hunters/static_shock
13+
path: packages/static_shock
14+
ref: main
1115

1216
dev_dependencies:
1317
lints: ^2.0.0

0 commit comments

Comments
 (0)