Skip to content

Commit

Permalink
Merge pull request #63 from universal-ember/support-customising-page-…
Browse files Browse the repository at this point in the history
…traversal

Change API of the PageNav component
  • Loading branch information
NullVoxPopuli committed Apr 28, 2024
2 parents ca4a90b + 3494041 commit dcc8a37
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 501 deletions.
1 change: 1 addition & 0 deletions docs-app/app/routes/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default class ApplicationRoute extends Route {
import('shiki/langs/bash.mjs'),
import('shiki/langs/css.mjs'),
import('shiki/langs/html.mjs'),
import('shiki/langs/markdown.mjs'),
import('shiki/langs/glimmer-js.mjs'),
import('shiki/langs/glimmer-ts.mjs'),
import('shiki/langs/handlebars.mjs'),
Expand Down
16 changes: 12 additions & 4 deletions docs-app/app/templates/application.gts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ const Menu: TOC<{ Element: SVGElement }> = <template>
const SideNav: TOC<{ Element: HTMLElement }> = <template>
<aside>
<PageNav ...attributes>
<:page as |page|>
{{nameFor page}}
<:page as |x|>
<x.Link>
{{nameFor x.page}}
</x.Link>
</:page>
<:collection as |collection|>
{{sentenceCase collection.name}}
<:collection as |x|>
{{#if x.index}}
<x.index.Link>
{{sentenceCase x.collection.name}}
</x.index.Link>
{{else}}
{{sentenceCase x.collection.name}}
{{/if}}
</:collection>
</PageNav>
</aside>
Expand Down
4 changes: 2 additions & 2 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.1.1",
"loader.js": "^4.7.0",
"pnpm-sync-dependencies-meta-injected": "^0.0.11",
"pnpm-sync-dependencies-meta-injected": "^0.0.12",
"prettier": "^3.1.1",
"prettier-plugin-ember-template-tag": "^2.0.0",
"qunit": "^2.20.0",
Expand Down Expand Up @@ -103,7 +103,7 @@
"ember-async-data": "^1.0.3",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-mobile-menu": "^5.1.0",
"ember-repl": "^4.2.1",
"ember-repl": "^4.1.1",
"ember-route-template": "^1.0.3",
"kolay": "workspace:^",
"reactiveweb": "^1.2.1",
Expand Down
69 changes: 69 additions & 0 deletions docs-app/public/docs/usage/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<h1 style="
font-size: 2rem;
display: inline-block;
margin-bottom: 0;
padding-bottom: 0">kolay</h1>
<small><code>adjective</code></small>

<ul style="margin: 0; padding-left: 1rem; padding-bottom: 0;">
<li>easy</li>
<li>simple</li>
<li>uncomplicated</li>
</ul>

<small style="
float: right;
margin-top: -2rem;
font-size: 0.5rem;">after initial setup</small>

<hr>

Documentation system for the the `@universal-ember` family of projects.

[➡️ Get started!](/usage/setup.md)

---

## Install[^type-module]

```bash
pnpm add kolay @universal-ember/kolay-ui
```

### Use Markdown

- from any folder, any project (good for monorepos)
- scales infinitely with your project size, as compiling the pages is done on-demand, rather than on-deploy
- any codefence can become a live demo with the `live` tag

````markdown
Some prose here about the demo

```gjs live
<template>interactive!</template>
```
````

### Use JSDoc

- JSDoc / TypeDoc is renderable via the `<APIDocs />` component

```markdown
## API Reference

<APIDocs @package="my-library" @module="..." @name="theExport" />
```

- render examples from your jsdoc for interactive demonstration of concepts using

````
text here

```gjs live
// the "live" tag on the codefence
```
````

### Navigation

- generate navigation based on convention based file layout
20 changes: 0 additions & 20 deletions docs-app/public/docs/usage/setup.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
<h1 style="
font-size: 2rem;
display: inline-block;
margin-bottom: 0;
padding-bottom: 0">kolay</h1>
<small><code>adjective</code></small>

<ul style="margin: 0; padding-left: 1rem; padding-bottom: 0;">
<li>easy</li>
<li>simple</li>
<li>uncomplicated</li>
</ul>

<small style="
float: right;
margin-top: -2rem;
font-size: 0.5rem;">after initial setup</small>

<hr>

## Install[^type-module]

```bash
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@
"test:node": "vitest --run"
},
"peerDependencies": {
"@ember/test-waiters": ">= 3.1.0",
"@ember/test-waiters": "^3.1.0",
"@glimmer/component": ">= 1.1.2",
"@glimmer/tracking": ">= 1.1.2",
"@glint/template": ">= 1.3.0",
"@universal-ember/kolay-ui": "workspace:^",
"ember-modifier": ">= 4.1.0",
"ember-primitives": "^0.11.3",
"ember-repl": ">= 4.1.1",
"ember-repl": "^4.1.1",
"ember-resources": ">= 7.0.0",
"ember-source": ">= 5.7.0",
"reactiveweb": ">= 1.2.1",
Expand Down Expand Up @@ -129,11 +129,11 @@
"concurrently": "^8.2.2",
"ember-modifier": "^4.1.0",
"ember-primitives": "^0.16.0",
"ember-repl": "^4.2.1",
"ember-repl": "^4.1.1",
"ember-resources": "^7.0.0",
"ember-source": "~5.8.0",
"eslint": "^8.56.0",
"pnpm-sync-dependencies-meta-injected": "^0.0.11",
"pnpm-sync-dependencies-meta-injected": "^0.0.12",
"prettier": "^3.1.1",
"publint": "^0.2.7",
"reactiveweb": "^1.2.1",
Expand Down
Loading

0 comments on commit dcc8a37

Please sign in to comment.