doxla 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -36,6 +36,14 @@ This creates a GitHub Actions workflow that builds and deploys your docs on ever
|
|
|
36
36
|
2. Under **Source**, select **GitHub Actions**
|
|
37
37
|
3. Commit and push — the workflow handles the rest
|
|
38
38
|
|
|
39
|
+
### One-click install with Kerex
|
|
40
|
+
|
|
41
|
+
Install Doxla into any GitHub repository — no local setup required:
|
|
42
|
+
|
|
43
|
+
**[Kerex it!](https://install.kerex.app/doxla)**
|
|
44
|
+
|
|
45
|
+
Paste your repo URL and Kerex will open a pull request with the Doxla workflow and config. Works with public and private repositories.
|
|
46
|
+
|
|
39
47
|
### Build locally
|
|
40
48
|
|
|
41
49
|
```bash
|
package/package.json
CHANGED
|
@@ -103,9 +103,17 @@ function TreeItem({
|
|
|
103
103
|
export function FileTree({ docs }: { docs: DocFile[] }) {
|
|
104
104
|
const tree = buildTree(docs);
|
|
105
105
|
|
|
106
|
+
const sortedRoots = Array.from(tree.children.values()).sort((a, b) => {
|
|
107
|
+
const aIsFolder = a.children.size > 0 && !a.doc;
|
|
108
|
+
const bIsFolder = b.children.size > 0 && !b.doc;
|
|
109
|
+
if (aIsFolder && !bIsFolder) return -1;
|
|
110
|
+
if (!aIsFolder && bIsFolder) return 1;
|
|
111
|
+
return a.name.localeCompare(b.name);
|
|
112
|
+
});
|
|
113
|
+
|
|
106
114
|
return (
|
|
107
115
|
<nav className="space-y-0.5">
|
|
108
|
-
{
|
|
116
|
+
{sortedRoots.map((node) => (
|
|
109
117
|
<TreeItem key={node.path} node={node} depth={0} />
|
|
110
118
|
))}
|
|
111
119
|
</nav>
|
|
@@ -22,7 +22,7 @@ export function MarkdownRenderer({ content, theme, docPath }: MarkdownRendererPr
|
|
|
22
22
|
code(props) {
|
|
23
23
|
const { children, className, ...rest } = props;
|
|
24
24
|
const match = /language-(\w+)/.exec(className || "");
|
|
25
|
-
const isInline = !match;
|
|
25
|
+
const isInline = !match && !String(children).endsWith('\n');
|
|
26
26
|
|
|
27
27
|
if (isInline) {
|
|
28
28
|
return (
|
|
@@ -38,7 +38,7 @@ export function MarkdownRenderer({ content, theme, docPath }: MarkdownRendererPr
|
|
|
38
38
|
return (
|
|
39
39
|
<SyntaxHighlighter
|
|
40
40
|
style={syntaxStyle}
|
|
41
|
-
language={match[1]}
|
|
41
|
+
language={match?.[1] ?? "text"}
|
|
42
42
|
PreTag="div"
|
|
43
43
|
className="rounded-md text-sm"
|
|
44
44
|
>
|
|
@@ -62,7 +62,7 @@ export function MdxRenderer({ content, theme, docPath }: MdxRendererProps) {
|
|
|
62
62
|
code(props: Record<string, unknown>) {
|
|
63
63
|
const { children, className, ...rest } = props;
|
|
64
64
|
const match = /language-(\w+)/.exec((className as string) || "");
|
|
65
|
-
const isInline = !match;
|
|
65
|
+
const isInline = !match && !String(children).endsWith('\n');
|
|
66
66
|
|
|
67
67
|
if (isInline) {
|
|
68
68
|
return (
|
|
@@ -78,7 +78,7 @@ export function MdxRenderer({ content, theme, docPath }: MdxRendererProps) {
|
|
|
78
78
|
return (
|
|
79
79
|
<SyntaxHighlighter
|
|
80
80
|
style={syntaxStyle}
|
|
81
|
-
language={match[1]}
|
|
81
|
+
language={match?.[1] ?? "text"}
|
|
82
82
|
PreTag="div"
|
|
83
83
|
className="rounded-md text-sm"
|
|
84
84
|
>
|