@dogsbay/samples 0.0.0-stage → 0.2.0-beta.126
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 +27 -2
- package/dist/index.d.ts +10 -0
- package/dist/index.js +4 -0
- package/dist/samples.d.ts +3 -0
- package/dist/samples.js +12 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +1 -0
- package/dita/components.dita +38 -0
- package/dita/concept.dita +21 -0
- package/dita/reference.dita +19 -0
- package/dita/task.dita +22 -0
- package/md/basics.md +32 -0
- package/md/callouts.md +19 -0
- package/md/cards-and-grid.md +24 -0
- package/md/details-and-accordion.md +20 -0
- package/md/tabs-and-steps.md +29 -0
- package/md/theme.md +24 -0
- package/package.json +40 -3
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dogsbay/samples
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One-screen sample pages, for the playground and the docs site to share.
|
|
4
|
+
|
|
5
|
+
| Format | Samples |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Dogsbay Markdown (`md/`) | basics, callouts, tabs and steps, cards and grid, details and accordion, theme band |
|
|
8
|
+
| DITA (`dita/`) | a concept, a task, a reference (with a `<properties>` table), and a topic using the `outputclass` components |
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { SAMPLES, sample } from "@dogsbay/samples";
|
|
12
|
+
|
|
13
|
+
for (const s of SAMPLES) console.log(s.id, s.format, s.title); // "task", "dita", "Publish a site"
|
|
14
|
+
const task = sample("task", "dita")!.source; // the DITA source as written
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The sources are strings in the module, so it runs in a browser; the same files
|
|
18
|
+
are published as `@dogsbay/samples/md/*.md` and `@dogsbay/samples/dita/*.dita`
|
|
19
|
+
for a site that reads them as files.
|
|
20
|
+
|
|
21
|
+
Each sample parses with no diagnostic (`dogsbayMdToTree(src, { diagnostics:
|
|
22
|
+
true })`), converts with no note beyond the expected semantic downgrades
|
|
23
|
+
(`ditaTopicToTree(src, { classDefaults: true })`), renders every node with
|
|
24
|
+
`@dogsbay/render-html`, and fits on one screen (45 lines). The tests check all of
|
|
25
|
+
that.
|
|
26
|
+
|
|
27
|
+
To add or change one, edit the file and run `pnpm --filter @dogsbay/samples
|
|
28
|
+
generate` (which writes `src/samples.ts`); the build refuses a stale module.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @dogsbay/samples — one-screen sample pages in Dogsbay Markdown and DITA,
|
|
3
|
+
* shared by the docs site and the playground. Browser-safe: the sources are
|
|
4
|
+
* strings in the module (and also published as files under md/ and dita/).
|
|
5
|
+
*/
|
|
6
|
+
export type { Sample } from "./types.js";
|
|
7
|
+
export { SAMPLES } from "./samples.js";
|
|
8
|
+
import type { Sample } from "./types.js";
|
|
9
|
+
/** The sample with this id and format, or undefined. */
|
|
10
|
+
export declare const sample: (id: string, format?: Sample["format"]) => Sample | undefined;
|
package/dist/index.js
ADDED
package/dist/samples.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const SAMPLES = Object.freeze([
|
|
2
|
+
{ "id": "basics", "format": "dogsbay-md", "title": "Markdown basics", "description": "Headings, lists, emphasis, links, code and tables.", "file": "md/basics.md", "source": "---\ntitle: Markdown basics\ndescription: Headings, lists, emphasis, links, code and tables.\n---\n\n# Markdown basics\n\nDogsbay Markdown is **CommonMark** with a few additions. It reads cleanly on\nGitHub and renders richly through Dogsbay. Press :kbd[Ctrl+S] to save.\n\n## Lists\n\n1. Install the CLI\n2. Create a site\n - pick a theme\n - add a page\n3. Build it\n\n## Code\n\n```bash title=\"Install\"\nnpm install -g dogsbay\n```\n\n## Tables\n\n| Command | What it does |\n|---|---|\n| `dogsbay site init` | Scaffolds a site |\n| `dogsbay site build` | Builds every target |\n\nRead more in the [CLI guide](https://dogsbay.ai/docs/cli).\n" },
|
|
3
|
+
{ "id": "callouts", "format": "dogsbay-md", "title": "Callouts", "description": "Notes, tips and warnings, in the GitHub form and the directive form.", "file": "md/callouts.md", "source": "---\ntitle: Callouts\ndescription: Notes, tips and warnings, in the GitHub form and the directive form.\n---\n\n# Callouts\n\n> [!NOTE]\n> The GitHub form degrades to a plain quote anywhere else.\n\n> [!TIP]\n> Keep callouts short: one idea each.\n\n> [!WARNING]\n> Deleting a site cannot be undone.\n\n:::caution{title=\"Before you upgrade\"}\nBack up `dogsbay.config.yml`. The directive form takes a custom title.\n:::\n" },
|
|
4
|
+
{ "id": "cards-and-grid", "format": "dogsbay-md", "title": "Cards and grid", "description": "Link cards for navigation, and a grid for mixed content.", "file": "md/cards-and-grid.md", "source": "---\ntitle: Cards and grid\ndescription: Link cards for navigation, and a grid for mixed content.\n---\n\n# Cards and grid\n\n:::cards\n- **[Install](https://dogsbay.ai/docs/install)**\n Five minutes to a running site.\n\n- **[Write](https://dogsbay.ai/docs/write)**\n Pages, components and includes.\n\n- **[Publish](https://dogsbay.ai/docs/publish)**\n Static hosting, sitemaps and search.\n:::\n\n:::link-card{href=\"https://dogsbay.ai/docs/migrate\" title=\"Migrate a site\" description=\"From MkDocs, Docusaurus, DITA and more.\"}\n:::\n\n:::button{href=\"https://dogsbay.ai/docs/install\"}\nGet started\n:::\n" },
|
|
5
|
+
{ "id": "details-and-accordion", "format": "dogsbay-md", "title": "Details and accordion", "description": "Collapsible sections for optional content, and an accordion for questions.", "file": "md/details-and-accordion.md", "source": "---\ntitle: Details and accordion\ndescription: Collapsible sections for optional content, and an accordion for questions.\n---\n\n# Details and accordion\n\n:::details{title=\"Advanced options\"}\nMost readers can skip this. It holds the settings nobody needs on day one.\n:::\n\n:::accordion\nIs Dogsbay free?\n: Yes. The CLI and the components are open source.\n\nCan I keep my Markdown?\n: Yes. Dogsbay Markdown is plain Markdown plus a few directives.\n:::\n\nThe beta has a new search :badge[New]{variant=\"success\"} and faster builds.\n" },
|
|
6
|
+
{ "id": "tabs-and-steps", "format": "dogsbay-md", "title": "Tabs and steps", "description": "Tabs from a definition list, and numbered steps.", "file": "md/tabs-and-steps.md", "source": "---\ntitle: Tabs and steps\ndescription: Tabs from a definition list, and numbered steps.\n---\n\n# Tabs and steps\n\n:::tabs\nLinux\n: ```bash\n sudo apt install dogsbay\n ```\n\nmacOS\n: ```bash\n brew install dogsbay\n ```\n\nWindows\n: ```powershell\n winget install dogsbay\n ```\n:::\n\n:::steps\n1. Create a site with `dogsbay site init`.\n2. Write a page in `content/`.\n3. Preview it with `dogsbay site dev`.\n:::\n" },
|
|
7
|
+
{ "id": "theme", "format": "dogsbay-md", "title": "Theme band", "description": "A section drawn with the dark theme.", "file": "md/theme.md", "source": "---\ntitle: Theme band\ndescription: A section drawn with the dark theme.\n---\n\n# Theme band\n\nMost of the page uses the site's theme.\n\n::::theme{name=\"dark\"}\n## Built for teams\n\nReviews, previews and a shared component library.\n\n:::tabs{variant=\"pills\"}\nWriters\n: Plain Markdown, live preview.\n\nReviewers\n: Comments on the rendered page.\n:::\n::::\n\nBack on the light page.\n" },
|
|
8
|
+
{ "id": "components", "format": "dita", "title": "Components from DITA", "description": "Standard DITA elements, with an outputclass that picks a component.", "file": "dita/components.dita", "source": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE topic PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"topic.dtd\">\n<topic id=\"components\">\n <title>Components from DITA</title>\n <shortdesc>Standard DITA elements, with an <codeph>outputclass</codeph> that picks a component.</shortdesc>\n <body>\n <dl outputclass=\"db-tabs\">\n <dlentry>\n <dt>Linux</dt>\n <dd><codeblock outputclass=\"language-bash\">sudo apt install dogsbay</codeblock></dd>\n </dlentry>\n <dlentry>\n <dt>macOS</dt>\n <dd><codeblock outputclass=\"language-bash\">brew install dogsbay</codeblock></dd>\n </dlentry>\n </dl>\n <dl outputclass=\"db-cards tone-info\">\n <dlentry>\n <dt><xref href=\"https://dogsbay.ai/docs/install\" scope=\"external\">Install</xref></dt>\n <dd>Five minutes to a running site.</dd>\n </dlentry>\n <dlentry>\n <dt><xref href=\"https://dogsbay.ai/docs/publish\" scope=\"external\">Publish</xref></dt>\n <dd>Static hosting, sitemaps and search.</dd>\n </dlentry>\n </dl>\n <p>Search <ph outputclass=\"db-badge tone-success\">New</ph></p>\n <ol outputclass=\"db-steps\">\n <li>Create a site.</li>\n <li>Write a page.</li>\n </ol>\n <p><xref href=\"https://dogsbay.ai/docs/install\" scope=\"external\" outputclass=\"db-button outline\">Get started</xref></p>\n <section id=\"advanced\" outputclass=\"db-details\">\n <title>Advanced options</title>\n <p>Most readers can skip this.</p>\n </section>\n </body>\n</topic>\n" },
|
|
9
|
+
{ "id": "concept", "format": "dita", "title": "About Dogsbay sites", "description": "A Dogsbay site is a folder of pages and one configuration file.", "file": "dita/concept.dita", "source": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE concept PUBLIC \"-//OASIS//DTD DITA Concept//EN\" \"concept.dtd\">\n<concept id=\"about-sites\">\n <title>About Dogsbay sites</title>\n <shortdesc>A Dogsbay site is a folder of pages and one configuration file.</shortdesc>\n <conbody>\n <p>Each page is a topic. The <filepath>dogsbay.config.yml</filepath> file names the site, its\n theme and where it is published.</p>\n <note type=\"tip\">\n <p>Start from <cmdname>dogsbay site init</cmdname>: it writes a working site you can edit.</p>\n </note>\n <section>\n <title>What a build produces</title>\n <ul>\n <li>One HTML page per topic</li>\n <li>A search index and a sitemap</li>\n <li>A Markdown twin of every page, for agents</li>\n </ul>\n </section>\n </conbody>\n</concept>\n" },
|
|
10
|
+
{ "id": "reference", "format": "dita", "title": "Configuration keys", "description": "The keys most sites set in dogsbay.config.yml.", "file": "dita/reference.dita", "source": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE reference PUBLIC \"-//OASIS//DTD DITA Reference//EN\" \"reference.dtd\">\n<reference id=\"config-keys\">\n <title>Configuration keys</title>\n <shortdesc>The keys most sites set in <filepath>dogsbay.config.yml</filepath>.</shortdesc>\n <refbody>\n <properties>\n <prophead><proptypehd>Key</proptypehd><propvaluehd>Default</propvaluehd><propdeschd>Meaning</propdeschd></prophead>\n <property><proptype>title</proptype><propvalue>none</propvalue><propdesc>The site's name, in the header and the page titles.</propdesc></property>\n <property><proptype>theme</proptype><propvalue>default</propvalue><propdesc>The token set: <codeph>default</codeph> or <codeph>material</codeph>.</propdesc></property>\n <property><proptype>poweredBy</proptype><propvalue>true</propvalue><propdesc>Show the footer mark.</propdesc></property>\n </properties>\n <section>\n <title>Example</title>\n <codeblock outputclass=\"language-yaml\">title: My docs\ntheme: material</codeblock>\n </section>\n </refbody>\n</reference>\n" },
|
|
11
|
+
{ "id": "task", "format": "dita", "title": "Publish a site", "description": "Build the site and copy the output to any static host.", "file": "dita/task.dita", "source": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE task PUBLIC \"-//OASIS//DTD DITA Task//EN\" \"task.dtd\">\n<task id=\"publish-site\">\n <title>Publish a site</title>\n <shortdesc>Build the site and copy the output to any static host.</shortdesc>\n <taskbody>\n <prereq><p>Install the CLI: <codeph>npm install -g dogsbay</codeph>.</p></prereq>\n <steps>\n <step><cmd>Open a terminal in the site folder.</cmd></step>\n <step>\n <cmd>Build the site.</cmd>\n <info><codeblock outputclass=\"language-bash\">dogsbay site build</codeblock></info>\n </step>\n <step>\n <cmd>Choose <menucascade><uicontrol>File</uicontrol><uicontrol>Upload</uicontrol></menucascade>\n in your host's console, and upload the <filepath>dist</filepath> folder.</cmd>\n <stepresult><p>The site is live at your host's address.</p></stepresult>\n </step>\n </steps>\n <result><p>Readers see the new pages straight away.</p></result>\n </taskbody>\n</task>\n" },
|
|
12
|
+
]);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** One sample page: its source as written, and what it is. */
|
|
2
|
+
export interface Sample {
|
|
3
|
+
/** The file name without its extension: `basics`, `task`. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** `dogsbay-md` (convert with dogsbayMdToTree) or `dita` (ditaTopicToTree). */
|
|
6
|
+
format: "dogsbay-md" | "dita";
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
/** Its path in this package (`md/basics.md`), also published as a file. */
|
|
10
|
+
file: string;
|
|
11
|
+
source: string;
|
|
12
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
|
3
|
+
<topic id="components">
|
|
4
|
+
<title>Components from DITA</title>
|
|
5
|
+
<shortdesc>Standard DITA elements, with an <codeph>outputclass</codeph> that picks a component.</shortdesc>
|
|
6
|
+
<body>
|
|
7
|
+
<dl outputclass="db-tabs">
|
|
8
|
+
<dlentry>
|
|
9
|
+
<dt>Linux</dt>
|
|
10
|
+
<dd><codeblock outputclass="language-bash">sudo apt install dogsbay</codeblock></dd>
|
|
11
|
+
</dlentry>
|
|
12
|
+
<dlentry>
|
|
13
|
+
<dt>macOS</dt>
|
|
14
|
+
<dd><codeblock outputclass="language-bash">brew install dogsbay</codeblock></dd>
|
|
15
|
+
</dlentry>
|
|
16
|
+
</dl>
|
|
17
|
+
<dl outputclass="db-cards tone-info">
|
|
18
|
+
<dlentry>
|
|
19
|
+
<dt><xref href="https://dogsbay.ai/docs/install" scope="external">Install</xref></dt>
|
|
20
|
+
<dd>Five minutes to a running site.</dd>
|
|
21
|
+
</dlentry>
|
|
22
|
+
<dlentry>
|
|
23
|
+
<dt><xref href="https://dogsbay.ai/docs/publish" scope="external">Publish</xref></dt>
|
|
24
|
+
<dd>Static hosting, sitemaps and search.</dd>
|
|
25
|
+
</dlentry>
|
|
26
|
+
</dl>
|
|
27
|
+
<p>Search <ph outputclass="db-badge tone-success">New</ph></p>
|
|
28
|
+
<ol outputclass="db-steps">
|
|
29
|
+
<li>Create a site.</li>
|
|
30
|
+
<li>Write a page.</li>
|
|
31
|
+
</ol>
|
|
32
|
+
<p><xref href="https://dogsbay.ai/docs/install" scope="external" outputclass="db-button outline">Get started</xref></p>
|
|
33
|
+
<section id="advanced" outputclass="db-details">
|
|
34
|
+
<title>Advanced options</title>
|
|
35
|
+
<p>Most readers can skip this.</p>
|
|
36
|
+
</section>
|
|
37
|
+
</body>
|
|
38
|
+
</topic>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
|
|
3
|
+
<concept id="about-sites">
|
|
4
|
+
<title>About Dogsbay sites</title>
|
|
5
|
+
<shortdesc>A Dogsbay site is a folder of pages and one configuration file.</shortdesc>
|
|
6
|
+
<conbody>
|
|
7
|
+
<p>Each page is a topic. The <filepath>dogsbay.config.yml</filepath> file names the site, its
|
|
8
|
+
theme and where it is published.</p>
|
|
9
|
+
<note type="tip">
|
|
10
|
+
<p>Start from <cmdname>dogsbay site init</cmdname>: it writes a working site you can edit.</p>
|
|
11
|
+
</note>
|
|
12
|
+
<section>
|
|
13
|
+
<title>What a build produces</title>
|
|
14
|
+
<ul>
|
|
15
|
+
<li>One HTML page per topic</li>
|
|
16
|
+
<li>A search index and a sitemap</li>
|
|
17
|
+
<li>A Markdown twin of every page, for agents</li>
|
|
18
|
+
</ul>
|
|
19
|
+
</section>
|
|
20
|
+
</conbody>
|
|
21
|
+
</concept>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
|
|
3
|
+
<reference id="config-keys">
|
|
4
|
+
<title>Configuration keys</title>
|
|
5
|
+
<shortdesc>The keys most sites set in <filepath>dogsbay.config.yml</filepath>.</shortdesc>
|
|
6
|
+
<refbody>
|
|
7
|
+
<properties>
|
|
8
|
+
<prophead><proptypehd>Key</proptypehd><propvaluehd>Default</propvaluehd><propdeschd>Meaning</propdeschd></prophead>
|
|
9
|
+
<property><proptype>title</proptype><propvalue>none</propvalue><propdesc>The site's name, in the header and the page titles.</propdesc></property>
|
|
10
|
+
<property><proptype>theme</proptype><propvalue>default</propvalue><propdesc>The token set: <codeph>default</codeph> or <codeph>material</codeph>.</propdesc></property>
|
|
11
|
+
<property><proptype>poweredBy</proptype><propvalue>true</propvalue><propdesc>Show the footer mark.</propdesc></property>
|
|
12
|
+
</properties>
|
|
13
|
+
<section>
|
|
14
|
+
<title>Example</title>
|
|
15
|
+
<codeblock outputclass="language-yaml">title: My docs
|
|
16
|
+
theme: material</codeblock>
|
|
17
|
+
</section>
|
|
18
|
+
</refbody>
|
|
19
|
+
</reference>
|
package/dita/task.dita
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
|
|
3
|
+
<task id="publish-site">
|
|
4
|
+
<title>Publish a site</title>
|
|
5
|
+
<shortdesc>Build the site and copy the output to any static host.</shortdesc>
|
|
6
|
+
<taskbody>
|
|
7
|
+
<prereq><p>Install the CLI: <codeph>npm install -g dogsbay</codeph>.</p></prereq>
|
|
8
|
+
<steps>
|
|
9
|
+
<step><cmd>Open a terminal in the site folder.</cmd></step>
|
|
10
|
+
<step>
|
|
11
|
+
<cmd>Build the site.</cmd>
|
|
12
|
+
<info><codeblock outputclass="language-bash">dogsbay site build</codeblock></info>
|
|
13
|
+
</step>
|
|
14
|
+
<step>
|
|
15
|
+
<cmd>Choose <menucascade><uicontrol>File</uicontrol><uicontrol>Upload</uicontrol></menucascade>
|
|
16
|
+
in your host's console, and upload the <filepath>dist</filepath> folder.</cmd>
|
|
17
|
+
<stepresult><p>The site is live at your host's address.</p></stepresult>
|
|
18
|
+
</step>
|
|
19
|
+
</steps>
|
|
20
|
+
<result><p>Readers see the new pages straight away.</p></result>
|
|
21
|
+
</taskbody>
|
|
22
|
+
</task>
|
package/md/basics.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Markdown basics
|
|
3
|
+
description: Headings, lists, emphasis, links, code and tables.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markdown basics
|
|
7
|
+
|
|
8
|
+
Dogsbay Markdown is **CommonMark** with a few additions. It reads cleanly on
|
|
9
|
+
GitHub and renders richly through Dogsbay. Press :kbd[Ctrl+S] to save.
|
|
10
|
+
|
|
11
|
+
## Lists
|
|
12
|
+
|
|
13
|
+
1. Install the CLI
|
|
14
|
+
2. Create a site
|
|
15
|
+
- pick a theme
|
|
16
|
+
- add a page
|
|
17
|
+
3. Build it
|
|
18
|
+
|
|
19
|
+
## Code
|
|
20
|
+
|
|
21
|
+
```bash title="Install"
|
|
22
|
+
npm install -g dogsbay
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Tables
|
|
26
|
+
|
|
27
|
+
| Command | What it does |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `dogsbay site init` | Scaffolds a site |
|
|
30
|
+
| `dogsbay site build` | Builds every target |
|
|
31
|
+
|
|
32
|
+
Read more in the [CLI guide](https://dogsbay.ai/docs/cli).
|
package/md/callouts.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Callouts
|
|
3
|
+
description: Notes, tips and warnings, in the GitHub form and the directive form.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Callouts
|
|
7
|
+
|
|
8
|
+
> [!NOTE]
|
|
9
|
+
> The GitHub form degrades to a plain quote anywhere else.
|
|
10
|
+
|
|
11
|
+
> [!TIP]
|
|
12
|
+
> Keep callouts short: one idea each.
|
|
13
|
+
|
|
14
|
+
> [!WARNING]
|
|
15
|
+
> Deleting a site cannot be undone.
|
|
16
|
+
|
|
17
|
+
:::caution{title="Before you upgrade"}
|
|
18
|
+
Back up `dogsbay.config.yml`. The directive form takes a custom title.
|
|
19
|
+
:::
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Cards and grid
|
|
3
|
+
description: Link cards for navigation, and a grid for mixed content.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cards and grid
|
|
7
|
+
|
|
8
|
+
:::cards
|
|
9
|
+
- **[Install](https://dogsbay.ai/docs/install)**
|
|
10
|
+
Five minutes to a running site.
|
|
11
|
+
|
|
12
|
+
- **[Write](https://dogsbay.ai/docs/write)**
|
|
13
|
+
Pages, components and includes.
|
|
14
|
+
|
|
15
|
+
- **[Publish](https://dogsbay.ai/docs/publish)**
|
|
16
|
+
Static hosting, sitemaps and search.
|
|
17
|
+
:::
|
|
18
|
+
|
|
19
|
+
:::link-card{href="https://dogsbay.ai/docs/migrate" title="Migrate a site" description="From MkDocs, Docusaurus, DITA and more."}
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
:::button{href="https://dogsbay.ai/docs/install"}
|
|
23
|
+
Get started
|
|
24
|
+
:::
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Details and accordion
|
|
3
|
+
description: Collapsible sections for optional content, and an accordion for questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Details and accordion
|
|
7
|
+
|
|
8
|
+
:::details{title="Advanced options"}
|
|
9
|
+
Most readers can skip this. It holds the settings nobody needs on day one.
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
:::accordion
|
|
13
|
+
Is Dogsbay free?
|
|
14
|
+
: Yes. The CLI and the components are open source.
|
|
15
|
+
|
|
16
|
+
Can I keep my Markdown?
|
|
17
|
+
: Yes. Dogsbay Markdown is plain Markdown plus a few directives.
|
|
18
|
+
:::
|
|
19
|
+
|
|
20
|
+
The beta has a new search :badge[New]{variant="success"} and faster builds.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs and steps
|
|
3
|
+
description: Tabs from a definition list, and numbered steps.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tabs and steps
|
|
7
|
+
|
|
8
|
+
:::tabs
|
|
9
|
+
Linux
|
|
10
|
+
: ```bash
|
|
11
|
+
sudo apt install dogsbay
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
macOS
|
|
15
|
+
: ```bash
|
|
16
|
+
brew install dogsbay
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Windows
|
|
20
|
+
: ```powershell
|
|
21
|
+
winget install dogsbay
|
|
22
|
+
```
|
|
23
|
+
:::
|
|
24
|
+
|
|
25
|
+
:::steps
|
|
26
|
+
1. Create a site with `dogsbay site init`.
|
|
27
|
+
2. Write a page in `content/`.
|
|
28
|
+
3. Preview it with `dogsbay site dev`.
|
|
29
|
+
:::
|
package/md/theme.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Theme band
|
|
3
|
+
description: A section drawn with the dark theme.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Theme band
|
|
7
|
+
|
|
8
|
+
Most of the page uses the site's theme.
|
|
9
|
+
|
|
10
|
+
::::theme{name="dark"}
|
|
11
|
+
## Built for teams
|
|
12
|
+
|
|
13
|
+
Reviews, previews and a shared component library.
|
|
14
|
+
|
|
15
|
+
:::tabs{variant="pills"}
|
|
16
|
+
Writers
|
|
17
|
+
: Plain Markdown, live preview.
|
|
18
|
+
|
|
19
|
+
Reviewers
|
|
20
|
+
: Comments on the rendered page.
|
|
21
|
+
:::
|
|
22
|
+
::::
|
|
23
|
+
|
|
24
|
+
Back on the light page.
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/samples",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0-beta.126",
|
|
4
|
+
"description": "One-screen sample pages in Dogsbay Markdown and DITA (concept, task, reference, components), shared by the docs site and the playground. Browser-safe; also shipped as files",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/dogsbay/dogsbay.git",
|
|
9
|
+
"directory": "packages/samples"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./md/*": "./md/*",
|
|
20
|
+
"./dita/*": "./dita/*"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"md",
|
|
25
|
+
"dita",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^25.9.5",
|
|
30
|
+
"esbuild": "0.28.1",
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"vitest": "^4.1.10",
|
|
33
|
+
"@dogsbay/format-dita": "0.2.0-beta.126",
|
|
34
|
+
"@dogsbay/types": "0.2.0-beta.126",
|
|
35
|
+
"@dogsbay/render-html": "0.2.0-beta.126",
|
|
36
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.126"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "node scripts/generate.mjs --check && tsc",
|
|
40
|
+
"generate": "node scripts/generate.mjs",
|
|
41
|
+
"test": "vitest run"
|
|
42
|
+
}
|
|
6
43
|
}
|