Skip to content

Commit 46b6830

Browse files
committed
Update docs
1 parent c48ffa0 commit 46b6830

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

docs-app/app/routes/application.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Route from '@ember/routing/route';
2-
import { service } from '@ember/service';
32

43
import rehypeShikiFromHighlighter from '@shikijs/rehype/core';
54
import { colorScheme, sync } from 'ember-primitives/color-scheme';
@@ -9,14 +8,10 @@ import getWasm from 'shiki/wasm';
98

109
sync();
1110

12-
import type { DocsService, Manifest } from 'kolay';
11+
import type { Manifest } from 'kolay';
1312

1413
export default class ApplicationRoute extends Route {
15-
@service('kolay/docs') declare docs: DocsService;
16-
1714
async model(): Promise<{ manifest: Manifest }> {
18-
await setupKolay(this);
19-
2015
const highlighter = await getHighlighterCore({
2116
themes: [import('shiki/themes/github-dark.mjs'), import('shiki/themes/github-light.mjs')],
2217
langs: [
@@ -33,7 +28,7 @@ export default class ApplicationRoute extends Route {
3328
loadWasm: getWasm,
3429
});
3530

36-
await this.docs.setup({
31+
const manifest = await setupKolay(this, {
3732
resolve: {
3833
'ember-primitives': import('ember-primitives'),
3934
kolay: import('kolay'),
@@ -53,6 +48,6 @@ export default class ApplicationRoute extends Route {
5348
],
5449
});
5550

56-
return { manifest: this.docs.manifest };
51+
return { manifest };
5752
}
5853
}

docs-app/public/docs/usage/setup.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Here is what this site does
116116
```ts
117117
// app/routes/application.ts
118118
import Route from "@ember/routing/route";
119-
import { service } from "@ember/service";
119+
import { setupKolay } from "kolay/setup";
120120

121121
import rehypeShikiFromHighlighter from "@shikijs/rehype/core";
122122
import { colorScheme, sync } from "ember-primitives/color-scheme";
@@ -125,11 +125,9 @@ import getWasm from "shiki/wasm";
125125

126126
sync();
127127

128-
import type { DocsService, Manifest } from "kolay";
128+
import type { Manifest } from "kolay";
129129

130130
export default class ApplicationRoute extends Route {
131-
@service("kolay/docs") declare docs: DocsService;
132-
133131
async model(): Promise<{ manifest: Manifest }> {
134132
const highlighter = await getHighlighterCore({
135133
themes: [import("shiki/themes/github-dark.mjs"), import("shiki/themes/github-light.mjs")],
@@ -147,9 +145,7 @@ export default class ApplicationRoute extends Route {
147145
loadWasm: getWasm,
148146
});
149147

150-
await this.docs.setup({
151-
apiDocs: import("kolay/api-docs:virtual"),
152-
manifest: import("kolay/manifest:virtual"),
148+
const manifest = await setupKolay({
153149
resolve: {
154150
"ember-primitives": import("ember-primitives"),
155151
kolay: import("kolay"),
@@ -169,7 +165,7 @@ export default class ApplicationRoute extends Route {
169165
],
170166
});
171167

172-
return { manifest: this.docs.manifest };
168+
return { manifest };
173169
}
174170
}
175171
```

0 commit comments

Comments
 (0)