Skip to content

Commit

Permalink
Updated the docs website using a new Static Shock template. (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-carroll committed May 10, 2024
1 parent d506c69 commit 1be7efc
Show file tree
Hide file tree
Showing 37 changed files with 1,229 additions and 435 deletions.
5 changes: 5 additions & 0 deletions doc/website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Android Studio and IntelliJ IDEA
.idea

.DS_Store
18 changes: 16 additions & 2 deletions doc/website/bin/super_editor_docs.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
import 'dart:io';

import 'package:static_shock/static_shock.dart';

Future<void> main(List<String> arguments) async {
// Configure the static website generator.
final staticShock = StaticShock()
// Here, you can directly hook into the StaticShock pipeline. For example,
// you can copy an "images" directory from the source set to build set:
..pick(DirectoryPicker.parse("images"))
..pick(DirectoryPicker.parse("_styles"))
// All 3rd party behavior is added through plugins, even the behavior
// shipped with Static Shock.
..plugin(const MarkdownPlugin())
..plugin(const JinjaPlugin())
..plugin(const PrettyUrlsPlugin())
..plugin(const RedirectsPlugin())
..plugin(const SassPlugin())
..plugin(DraftingPlugin(
showDrafts: arguments.contains("preview"),
))
..plugin(const PubPackagePlugin({
"super_editor",
"super_text_layout",
"attributed_text",
}));
}))
..plugin(
GitHubContributorsPlugin(
authToken: Platform.environment["github_doc_website_token"],
),
);

// Generate the static website.
await staticShock.generateSite();
Expand Down

0 comments on commit 1be7efc

Please sign in to comment.