Skip to content

Commit ddf83cd

Browse files
committed
feat: update static_shock
1 parent 5dd463a commit ddf83cd

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

bin/main.dart

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:static_shock/static_shock.dart';
22

33
Future<void> main(List<String> arguments) async {
4-
// Configure the static website generator.
54
final staticShock = StaticShock()
65
// Here, you can directly hook into the StaticShock pipeline. For example,
76
// you can copy an "images" directory from the source set to build set:
@@ -15,22 +14,26 @@ Future<void> main(List<String> arguments) async {
1514
..plugin(const PrettyUrlsPlugin())
1615
..plugin(const RedirectsPlugin())
1716
..plugin(const SassPlugin())
18-
..plugin(DraftingPlugin(
19-
showDrafts: arguments.contains("preview"),
20-
))
21-
..plugin(RssPlugin(
22-
site: RssSiteConfiguration(
23-
title: "Catalyst Voices Updates",
24-
description:
25-
"Discover the latest features in our Catalyst Voices apps.",
26-
homePageUrl: "",
17+
..plugin(
18+
DraftingPlugin(
19+
showDrafts: arguments.contains("preview"),
2720
),
28-
pageToRssItemMapper: (RssSiteConfiguration config, Page page) {
29-
return defaultPageToRssItemMapper(config, page)?.copyWith(
30-
author: page.data["author"],
31-
);
32-
},
33-
));
21+
)
22+
..plugin(
23+
RssPlugin(
24+
site: RssSiteConfiguration(
25+
title: "Catalyst Voices Updates",
26+
description:
27+
"Discover the latest features in our Catalyst Voices apps.",
28+
homePageUrl: "",
29+
),
30+
pageToRssItemMapper: (RssSiteConfiguration config, Page page) {
31+
return defaultPageToRssItemMapper(config, page)?.copyWith(
32+
author: page.data["author"],
33+
);
34+
},
35+
),
36+
);
3437

3538
// Generate the static website.
3639
await staticShock.generateSite();

pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ 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
1114

1215
dev_dependencies:
1316
lints: ^2.0.0

0 commit comments

Comments
 (0)