diff --git a/flake.lock b/flake.lock
index b8a3733..2b27804 100644
--- a/flake.lock
+++ b/flake.lock
@@ -22,11 +22,11 @@
]
},
"locked": {
- "lastModified": 1720770600,
- "narHash": "sha256-Ouic1xV4pJns1rbw6wnee9fO4VWkcv73hxSLQkPYabk=",
+ "lastModified": 1725876916,
+ "narHash": "sha256-3SDm2pV1ZIQHqIhAe7BjuXhNdVyzcxPiwaFyqE8ODdc=",
"ref": "refs/heads/master",
- "rev": "d630cc7f76b56ad3ebe084159df6beab48db9866",
- "revCount": 247,
+ "rev": "85be3861ceadba6e3d877a64cade15015ea0c96f",
+ "revCount": 324,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},
diff --git a/layouts/docs/list.html b/layouts/docs/list.html
new file mode 100644
index 0000000..fc5c73a
--- /dev/null
+++ b/layouts/docs/list.html
@@ -0,0 +1,18 @@
+{{ define "main" }}
+
+ {{ partial "sidebar.html" (dict "context" .) }}
+ {{ partial "toc.html" . }}
+
+
+ {{ partial "breadcrumb.html" . }}
+
+ {{- if not (isset .Params "hidetitle") -}}
{{ .Title }}
{{- end -}}
+ {{ .Content }}
+
+ {{ partial "components/last-updated.html" . }}
+ {{ partial "components/pager.html" . }}
+ {{ partial "components/comments.html" . }}
+
+
+
+{{ end }}
diff --git a/layouts/shortcodes/qmltypelink.html b/layouts/shortcodes/qmltypelink.html
new file mode 100644
index 0000000..018ebd5
--- /dev/null
+++ b/layouts/shortcodes/qmltypelink.html
@@ -0,0 +1,9 @@
+{{- $params := dict
+ "type" (.Get "type")
+ "module" (.Get "module")
+ "name" (.Get "name")
+ "mtype" (.Get "mtype")
+ "mname" (.Get "mname")
+-}}
+
+{{- partial "qmltype.html" $params -}}
diff --git a/typegen/src/main.rs b/typegen/src/main.rs
index d1736ab..0e22cc9 100644
--- a/typegen/src/main.rs
+++ b/typegen/src/main.rs
@@ -4,6 +4,7 @@ use anyhow::{anyhow, Context};
mod outform;
mod parse;
+mod reformat;
mod resolver;
mod typespec;
@@ -107,6 +108,7 @@ hidetitle = true
}
let index = outform::ModuleIndex {
+ name: module.header.name.to_string(),
description: module.header.description,
details: module.details.to_string(),
};
diff --git a/typegen/src/outform.rs b/typegen/src/outform.rs
index 185cc5b..641d64c 100644
--- a/typegen/src/outform.rs
+++ b/typegen/src/outform.rs
@@ -4,14 +4,23 @@ use serde::Serialize;
#[derive(Debug, Serialize)]
pub struct ModuleIndex {
+ pub name: String,
pub description: String,
pub details: String,
}
+#[derive(Debug, Serialize)]
+pub struct TypeInfo {
+ pub name: String,
+ pub module: String,
+ #[serde(flatten)]
+ pub details: TypeDetails,
+}
+
#[derive(Debug, Serialize)]
#[serde(rename_all = "lowercase")]
#[serde(tag = "type")]
-pub enum TypeInfo {
+pub enum TypeDetails {
Class(ClassInfo),
Enum(EnumInfo),
}
diff --git a/typegen/src/parse.rs b/typegen/src/parse.rs
index 2a8d7f8..3b2b73a 100644
--- a/typegen/src/parse.rs
+++ b/typegen/src/parse.rs
@@ -4,7 +4,10 @@ use anyhow::{anyhow, bail, Context};
use fancy_regex::Regex;
use serde::Deserialize;
-use crate::typespec;
+use crate::{
+ reformat::{self, ReformatPass},
+ typespec,
+};
#[derive(Deserialize, Debug)]
pub struct ModuleInfoHeader {
@@ -149,12 +152,12 @@ impl Parser {
class_regex: Regex::new(r#"(?