mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-17 22:18:14 -07:00
website: big snapshot + cleanup
This commit is contained in:
+931
-3204
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,6 @@ brk_types = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
jiff = { workspace = true }
|
||||
# quickmatch = { path = "../../../quickmatch" }
|
||||
quickmatch = "0.2.0"
|
||||
quickmatch = "0.3.1"
|
||||
tokio = { workspace = true, optional = true }
|
||||
vecdb = { workspace = true }
|
||||
|
||||
@@ -6,7 +6,7 @@ use aide::{
|
||||
};
|
||||
use axum::{
|
||||
Extension,
|
||||
http::HeaderMap,
|
||||
http::{HeaderMap, header},
|
||||
response::{Html, Redirect, Response},
|
||||
routing::get,
|
||||
};
|
||||
@@ -83,6 +83,9 @@ impl ApiRoutes for ApiRouter<AppState> {
|
||||
),
|
||||
)
|
||||
.route("/api", get(Html::from(include_str!("./scalar.html"))))
|
||||
.route("/scalar.js", get(|| async {
|
||||
([(header::CONTENT_TYPE, "application/javascript")], include_str!("./scalar.js"))
|
||||
}))
|
||||
.route(
|
||||
"/api/{*path}",
|
||||
get(|| async { Redirect::permanent("/api") }),
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<!-- https://app.unpkg.com/@scalar/api-reference@1.37.0/files/dist/browser/standalone.js -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
||||
<script src="/scalar.js"></script>
|
||||
|
||||
<script>
|
||||
Scalar.createApiReference("#app", {
|
||||
url: "/openapi.json",
|
||||
hideClientButton: true,
|
||||
telemetry: false,
|
||||
withDefaultFonts: false,
|
||||
// showToolbar: "never",
|
||||
});
|
||||
</script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -13,4 +13,4 @@ proc-macro = true
|
||||
[dependencies]
|
||||
syn = "2.0"
|
||||
quote = "1.0"
|
||||
proc-macro2 = "1.0.105"
|
||||
proc-macro2 = "1.0.106"
|
||||
|
||||
@@ -11,7 +11,8 @@ include = ["src/**/*", "website/**/*", "examples/**/*", "Cargo.toml", "README.md
|
||||
[dependencies]
|
||||
axum = { workspace = true }
|
||||
include_dir = "0.7"
|
||||
importmap = { version = "0.3.1", features = ["embedded"] }
|
||||
# importmap = { path = "../../../importmap", features = ["embedded"] }
|
||||
importmap = { version = "0.4.0", features = ["embedded"] }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
Reference in New Issue
Block a user