create-riebeckite 0.0.24 → 0.0.25

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/dist/src/index.js CHANGED
@@ -2591,7 +2591,7 @@ function referenceThemesContent(preset) {
2591
2591
  }
2592
2592
 
2593
2593
  // src/scaffold/version.ts
2594
- var RIEBECKITE_VERSION = "^0.0.24";
2594
+ var RIEBECKITE_VERSION = "^0.0.25";
2595
2595
 
2596
2596
  // src/scaffold/templates.ts
2597
2597
  function siteTemplateFiles(preset, variables, options = {}) {
@@ -2657,6 +2657,7 @@ function packageJson(preset, variables, options) {
2657
2657
  const dependencies = {
2658
2658
  "@riebeckite/core": RIEBECKITE_VERSION,
2659
2659
  "@riebeckite/honox": RIEBECKITE_VERSION,
2660
+ "@riebeckite/ui": RIEBECKITE_VERSION,
2660
2661
  hono: "^4.12.25",
2661
2662
  honox: "0.1.56"
2662
2663
  };
@@ -2261,7 +2261,7 @@ function utilityTemplateFiles(utilities) {
2261
2261
  }
2262
2262
 
2263
2263
  // src/scaffold/version.ts
2264
- var RIEBECKITE_VERSION = "^0.0.24";
2264
+ var RIEBECKITE_VERSION = "^0.0.25";
2265
2265
 
2266
2266
  // src/scaffold/templates.ts
2267
2267
  function siteTemplateFiles(preset, variables, options = {}) {
@@ -2327,6 +2327,7 @@ function packageJson(preset, variables, options) {
2327
2327
  const dependencies = {
2328
2328
  "@riebeckite/core": RIEBECKITE_VERSION,
2329
2329
  "@riebeckite/honox": RIEBECKITE_VERSION,
2330
+ "@riebeckite/ui": RIEBECKITE_VERSION,
2330
2331
  hono: "^4.12.25",
2331
2332
  honox: "0.1.56"
2332
2333
  };
@@ -1 +1 @@
1
- export declare const RIEBECKITE_VERSION = "^0.0.24";
1
+ export declare const RIEBECKITE_VERSION = "^0.0.25";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-riebeckite",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "esbuild": "^0.28.2",
42
- "@riebeckite/test": "0.0.24"
42
+ "@riebeckite/test": "0.0.25"
43
43
  },
44
44
  "repository": {
45
45
  "type": "git",
@@ -1,11 +1,10 @@
1
- import type { PostContent } from "@riebeckite/core";
2
1
  import { Article, ArticleBody, ArticleContent } from "@riebeckite/honox/ui";
3
2
 
4
- export function SiteArticle({ post }: { post: PostContent }) {
3
+ export function SiteArticle() {
5
4
  return (
6
5
  <Article class="site-article">
7
6
  <ArticleContent>
8
- <ArticleBody html={post.html ?? ""} />
7
+ <ArticleBody />
9
8
  </ArticleContent>
10
9
  </Article>
11
10
  );
@@ -1,26 +1,10 @@
1
- import {
2
- contentRouteSsgParams,
3
- resolveRiebeckiteContentRequest,
4
- riebeckiteSsgParams,
5
- } from "@riebeckite/honox/server";
6
- import { PageBody } from "@riebeckite/honox/ui";
7
- import { createRoute } from "honox/factory";
1
+ import { createContentRoute } from "@riebeckite/honox/server";
8
2
  import { SiteArticle } from "../components/article";
3
+ import { config } from "virtual:riebeckite/config";
9
4
  import { content } from "virtual:riebeckite/content";
10
5
 
11
- export default createRoute(
12
- contentRouteSsgParams("/:slug{.+}", () => riebeckiteSsgParams(content)),
13
- async (c) => {
14
- const resolved = await resolveRiebeckiteContentRequest(c, content);
15
-
16
- if (resolved.kind === "response") return resolved.response;
17
-
18
- if (resolved.kind === "page") {
19
- return c.render(<PageBody html={resolved.page.body} />);
20
- }
21
-
22
- return c.render(
23
- <SiteArticle post={resolved.post} />,
24
- );
25
- },
26
- );
6
+ export default createContentRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
10
+ });
@@ -1,19 +1,10 @@
1
- import { resolveRiebeckiteHomeRequest } from "@riebeckite/honox/server";
2
- import { PageBody } from "@riebeckite/honox/ui";
3
- import { createRoute } from "honox/factory";
1
+ import { createHomeRoute } from "@riebeckite/honox/server";
4
2
  import { SiteArticle } from "../components/article";
3
+ import { config } from "virtual:riebeckite/config";
5
4
  import { content } from "virtual:riebeckite/content";
6
5
 
7
- export default createRoute(async (c) => {
8
- const home = await resolveRiebeckiteHomeRequest(c, content);
9
-
10
- if (home.kind === "response") return home.response;
11
-
12
- if (home.kind === "page") {
13
- return c.render(<PageBody html={home.page.body} />);
14
- }
15
-
16
- return c.render(
17
- <SiteArticle post={home.post} />,
18
- );
6
+ export default createHomeRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
19
10
  });
@@ -1,31 +1,32 @@
1
- import type { PostContent } from "@riebeckite/core";
2
1
  import { Article, ArticleBody, ArticleContent, ArticleFooter } from "@riebeckite/honox/ui";
2
+ import { Backlinks } from "@riebeckite/plugin-backlinks";
3
+ import { Breadcrumbs } from "@riebeckite/plugin-breadcrumbs";
4
+ import { DailyNotes } from "@riebeckite/plugin-daily-notes";
5
+ import { Properties } from "@riebeckite/plugin-properties";
6
+ import { RecentPosts } from "@riebeckite/plugin-recent-posts";
7
+ import { RelatedPosts } from "@riebeckite/plugin-related-posts";
8
+ import { ShareControls } from "@riebeckite/plugin-share";
9
+ import { TableOfContents } from "@riebeckite/plugin-toc";
3
10
 
4
- type SiteArticleProps = {
5
- post: PostContent;
6
- header?: unknown;
7
- metadata?: unknown;
8
- aside?: unknown;
9
- afterContent?: unknown;
10
- footer?: unknown;
11
- };
12
-
13
- export function SiteArticle(props: SiteArticleProps) {
11
+ export function SiteArticle() {
14
12
  return (
15
13
  <Article class="site-article">
16
14
  <div class="site-article__layout">
17
15
  <ArticleContent>
18
- {props.header}
19
- {props.metadata}
20
- <ArticleBody html={props.post.html ?? ""} />
21
- {props.afterContent}
22
- {props.footer ? (
23
- <ArticleFooter class="site-article__footer">
24
- {props.footer}
25
- </ArticleFooter>
26
- ) : null}
16
+ <Breadcrumbs />
17
+ <Properties />
18
+ <ArticleBody />
19
+ <RecentPosts />
20
+ <DailyNotes />
21
+ <ArticleFooter class="site-article__footer">
22
+ <ShareControls />
23
+ <Backlinks />
24
+ <RelatedPosts />
25
+ </ArticleFooter>
27
26
  </ArticleContent>
28
- {props.aside ? <aside class="site-article__aside">{props.aside}</aside> : null}
27
+ <aside class="site-article__aside">
28
+ <TableOfContents className="rr-table-of-contents--desktop" />
29
+ </aside>
29
30
  </div>
30
31
  </Article>
31
32
  );
@@ -1,47 +1,10 @@
1
- import {
2
- contentRouteSsgParams,
3
- resolveRiebeckiteContentRequest,
4
- riebeckiteSsgParams,
5
- } from "@riebeckite/honox/server";
6
- import { PageBody } from "@riebeckite/honox/ui";
7
- import { createPublicContentView } from "@riebeckite/core";
8
- import { Backlinks, getBacklinks } from "@riebeckite/plugin-backlinks";
9
- import { Breadcrumbs, getBreadcrumbs } from "@riebeckite/plugin-breadcrumbs";
10
- import { Properties, getProperties } from "@riebeckite/plugin-properties";
11
- import { getRelatedPosts, RelatedPosts, resolveRelatedPostsOptions } from "@riebeckite/plugin-related-posts";
12
- import { getShareLinks, ShareControls } from "@riebeckite/plugin-share";
13
- import { extractTableOfContents, TableOfContents } from "@riebeckite/plugin-toc";
14
- import { createRoute } from "honox/factory";
1
+ import { createContentRoute } from "@riebeckite/honox/server";
15
2
  import { SiteArticle } from "../components/article";
16
3
  import { config } from "virtual:riebeckite/config";
17
4
  import { content } from "virtual:riebeckite/content";
18
5
 
19
- export default createRoute(
20
- contentRouteSsgParams("/:slug{.+}", () => riebeckiteSsgParams(content)),
21
- async (c) => {
22
- const resolved = await resolveRiebeckiteContentRequest(c, content);
23
-
24
- if (resolved.kind === "response") return resolved.response;
25
-
26
- if (resolved.kind === "page") {
27
- return c.render(<PageBody html={resolved.page.body} />);
28
- }
29
-
30
- const tableOfContents = extractTableOfContents(resolved.post.html ?? "");
31
- const manifest = await content.getManifest();
32
- const view = createPublicContentView(manifest);
33
- const entry = view.findRoutableBySlug(resolved.entry.slug);
34
- if (!entry) return c.notFound();
35
- const relatedOptions = resolveRelatedPostsOptions({});
36
-
37
- return c.render(
38
- <SiteArticle
39
- post={resolved.post}
40
- header={<Breadcrumbs items={getBreadcrumbs({ view, entry, homeLabel: config.site.title })} />}
41
- metadata={<Properties data={getProperties({ view, frontmatter: resolved.post.frontmatter, options: { include: ["created", "modified", "tags", "status"], order: ["created", "modified", "tags", "status"] } })} />}
42
- aside={<TableOfContents className="rr-table-of-contents--desktop" items={tableOfContents} />}
43
- footer={<><ShareControls {...getShareLinks({ entry, site: config })} /><Backlinks backlinks={getBacklinks({ view, slug: entry.slug })} /><RelatedPosts entries={getRelatedPosts({ view, entry, options: relatedOptions })} options={relatedOptions} /></>}
44
- />,
45
- );
46
- },
47
- );
6
+ export default createContentRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
10
+ });
@@ -1,45 +1,10 @@
1
- import { resolveRiebeckiteHomeRequest } from "@riebeckite/honox/server";
2
- import { PageBody } from "@riebeckite/honox/ui";
3
- import { createPublicContentView } from "@riebeckite/core";
4
- import { Backlinks, getBacklinks } from "@riebeckite/plugin-backlinks";
5
- import { Breadcrumbs, getBreadcrumbs } from "@riebeckite/plugin-breadcrumbs";
6
- import { Properties, getProperties } from "@riebeckite/plugin-properties";
7
- import { getRelatedPosts, RelatedPosts, resolveRelatedPostsOptions } from "@riebeckite/plugin-related-posts";
8
- import { DailyNotes, getDailyNotes } from "@riebeckite/plugin-daily-notes";
9
- import { getRecentPosts, RecentPosts } from "@riebeckite/plugin-recent-posts";
10
- import { getShareLinks, ShareControls } from "@riebeckite/plugin-share";
11
- import { extractTableOfContents, TableOfContents } from "@riebeckite/plugin-toc";
12
- import { createRoute } from "honox/factory";
1
+ import { createHomeRoute } from "@riebeckite/honox/server";
13
2
  import { SiteArticle } from "../components/article";
14
3
  import { config } from "virtual:riebeckite/config";
15
4
  import { content } from "virtual:riebeckite/content";
16
5
 
17
- export default createRoute(async (c) => {
18
- const home = await resolveRiebeckiteHomeRequest(c, content);
19
-
20
- if (home.kind === "response") return home.response;
21
-
22
- if (home.kind === "page") {
23
- return c.render(<PageBody html={home.page.body} />);
24
- }
25
-
26
- const manifest = await content.getManifest();
27
- const recentPosts = getRecentPosts({ manifest });
28
- const dailyNotes = getDailyNotes({ manifest, config });
29
- const tableOfContents = extractTableOfContents(home.post.html ?? "");
30
- const view = createPublicContentView(manifest);
31
- const entry = view.findRoutableBySlug(home.entry.slug);
32
- if (!entry) return c.notFound();
33
- const relatedOptions = resolveRelatedPostsOptions({});
34
-
35
- return c.render(
36
- <SiteArticle
37
- post={home.post}
38
- header={<Breadcrumbs items={getBreadcrumbs({ view, entry, homeLabel: config.site.title })} />}
39
- metadata={<Properties data={getProperties({ view, frontmatter: home.post.frontmatter, options: { include: ["created", "modified", "tags", "status"], order: ["created", "modified", "tags", "status"] } })} />}
40
- aside={<TableOfContents className="rr-table-of-contents--desktop" items={tableOfContents} />}
41
- afterContent={<><RecentPosts posts={recentPosts} /><DailyNotes notes={dailyNotes} /></>}
42
- footer={<><ShareControls {...getShareLinks({ entry, site: config })} /><Backlinks backlinks={getBacklinks({ view, slug: entry.slug })} /><RelatedPosts entries={getRelatedPosts({ view, entry, options: relatedOptions })} options={relatedOptions} /></>}
43
- />,
44
- );
6
+ export default createHomeRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
45
10
  });
@@ -1,31 +1,28 @@
1
- import type { PostContent } from "@riebeckite/core";
2
1
  import { Article, ArticleBody, ArticleContent, ArticleFooter } from "@riebeckite/honox/ui";
2
+ import { Backlinks } from "@riebeckite/plugin-backlinks";
3
+ import { Breadcrumbs } from "@riebeckite/plugin-breadcrumbs";
4
+ import { Properties } from "@riebeckite/plugin-properties";
5
+ import { RecentPosts } from "@riebeckite/plugin-recent-posts";
6
+ import { RelatedPosts } from "@riebeckite/plugin-related-posts";
7
+ import { TableOfContents } from "@riebeckite/plugin-toc";
3
8
 
4
- type SiteArticleProps = {
5
- post: PostContent;
6
- header?: unknown;
7
- metadata?: unknown;
8
- aside?: unknown;
9
- afterContent?: unknown;
10
- footer?: unknown;
11
- };
12
-
13
- export function SiteArticle(props: SiteArticleProps) {
9
+ export function SiteArticle() {
14
10
  return (
15
11
  <Article class="site-article">
16
12
  <div class="site-article__layout">
17
13
  <ArticleContent>
18
- {props.header}
19
- {props.metadata}
20
- <ArticleBody html={props.post.html ?? ""} />
21
- {props.afterContent}
22
- {props.footer ? (
23
- <ArticleFooter class="site-article__footer">
24
- {props.footer}
25
- </ArticleFooter>
26
- ) : null}
14
+ <Breadcrumbs />
15
+ <Properties />
16
+ <ArticleBody />
17
+ <RecentPosts />
18
+ <ArticleFooter class="site-article__footer">
19
+ <Backlinks />
20
+ <RelatedPosts />
21
+ </ArticleFooter>
27
22
  </ArticleContent>
28
- {props.aside ? <aside class="site-article__aside">{props.aside}</aside> : null}
23
+ <aside class="site-article__aside">
24
+ <TableOfContents className="rr-table-of-contents--desktop" />
25
+ </aside>
29
26
  </div>
30
27
  </Article>
31
28
  );
@@ -1,46 +1,10 @@
1
- import {
2
- contentRouteSsgParams,
3
- resolveRiebeckiteContentRequest,
4
- riebeckiteSsgParams,
5
- } from "@riebeckite/honox/server";
6
- import { PageBody } from "@riebeckite/honox/ui";
7
- import { createPublicContentView } from "@riebeckite/core";
8
- import { Backlinks, getBacklinks } from "@riebeckite/plugin-backlinks";
9
- import { Breadcrumbs, getBreadcrumbs } from "@riebeckite/plugin-breadcrumbs";
10
- import { Properties, getProperties } from "@riebeckite/plugin-properties";
11
- import { getRelatedPosts, RelatedPosts, resolveRelatedPostsOptions } from "@riebeckite/plugin-related-posts";
12
- import { extractTableOfContents, TableOfContents } from "@riebeckite/plugin-toc";
13
- import { createRoute } from "honox/factory";
1
+ import { createContentRoute } from "@riebeckite/honox/server";
14
2
  import { SiteArticle } from "../components/article";
15
3
  import { config } from "virtual:riebeckite/config";
16
4
  import { content } from "virtual:riebeckite/content";
17
5
 
18
- export default createRoute(
19
- contentRouteSsgParams("/:slug{.+}", () => riebeckiteSsgParams(content)),
20
- async (c) => {
21
- const resolved = await resolveRiebeckiteContentRequest(c, content);
22
-
23
- if (resolved.kind === "response") return resolved.response;
24
-
25
- if (resolved.kind === "page") {
26
- return c.render(<PageBody html={resolved.page.body} />);
27
- }
28
-
29
- const tableOfContents = extractTableOfContents(resolved.post.html ?? "");
30
- const manifest = await content.getManifest();
31
- const view = createPublicContentView(manifest);
32
- const entry = view.findRoutableBySlug(resolved.entry.slug);
33
- if (!entry) return c.notFound();
34
- const relatedOptions = resolveRelatedPostsOptions({});
35
-
36
- return c.render(
37
- <SiteArticle
38
- post={resolved.post}
39
- header={<Breadcrumbs items={getBreadcrumbs({ view, entry, homeLabel: config.site.title })} />}
40
- metadata={<Properties data={getProperties({ view, frontmatter: resolved.post.frontmatter, options: { include: ["created", "modified", "tags", "status"], order: ["created", "modified", "tags", "status"] } })} />}
41
- aside={<TableOfContents className="rr-table-of-contents--desktop" items={tableOfContents} />}
42
- footer={<><Backlinks backlinks={getBacklinks({ view, slug: entry.slug })} /><RelatedPosts entries={getRelatedPosts({ view, entry, options: relatedOptions })} options={relatedOptions} /></>}
43
- />,
44
- );
45
- },
46
- );
6
+ export default createContentRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
10
+ });
@@ -1,42 +1,10 @@
1
- import { resolveRiebeckiteHomeRequest } from "@riebeckite/honox/server";
2
- import { PageBody } from "@riebeckite/honox/ui";
3
- import { createPublicContentView } from "@riebeckite/core";
4
- import { Backlinks, getBacklinks } from "@riebeckite/plugin-backlinks";
5
- import { Breadcrumbs, getBreadcrumbs } from "@riebeckite/plugin-breadcrumbs";
6
- import { Properties, getProperties } from "@riebeckite/plugin-properties";
7
- import { getRelatedPosts, RelatedPosts, resolveRelatedPostsOptions } from "@riebeckite/plugin-related-posts";
8
- import { getRecentPosts, RecentPosts } from "@riebeckite/plugin-recent-posts";
9
- import { extractTableOfContents, TableOfContents } from "@riebeckite/plugin-toc";
10
- import { createRoute } from "honox/factory";
1
+ import { createHomeRoute } from "@riebeckite/honox/server";
11
2
  import { SiteArticle } from "../components/article";
12
3
  import { config } from "virtual:riebeckite/config";
13
4
  import { content } from "virtual:riebeckite/content";
14
5
 
15
- export default createRoute(async (c) => {
16
- const home = await resolveRiebeckiteHomeRequest(c, content);
17
-
18
- if (home.kind === "response") return home.response;
19
-
20
- if (home.kind === "page") {
21
- return c.render(<PageBody html={home.page.body} />);
22
- }
23
-
24
- const manifest = await content.getManifest();
25
- const recentPosts = getRecentPosts({ manifest });
26
- const tableOfContents = extractTableOfContents(home.post.html ?? "");
27
- const view = createPublicContentView(manifest);
28
- const entry = view.findRoutableBySlug(home.entry.slug);
29
- if (!entry) return c.notFound();
30
- const relatedOptions = resolveRelatedPostsOptions({});
31
-
32
- return c.render(
33
- <SiteArticle
34
- post={home.post}
35
- header={<Breadcrumbs items={getBreadcrumbs({ view, entry, homeLabel: config.site.title })} />}
36
- metadata={<Properties data={getProperties({ view, frontmatter: home.post.frontmatter, options: { include: ["created", "modified", "tags", "status"], order: ["created", "modified", "tags", "status"] } })} />}
37
- aside={<TableOfContents className="rr-table-of-contents--desktop" items={tableOfContents} />}
38
- afterContent={<RecentPosts posts={recentPosts} />}
39
- footer={<><Backlinks backlinks={getBacklinks({ view, slug: entry.slug })} /><RelatedPosts entries={getRelatedPosts({ view, entry, options: relatedOptions })} options={relatedOptions} /></>}
40
- />,
41
- );
6
+ export default createHomeRoute({
7
+ content,
8
+ config,
9
+ render: () => <SiteArticle />,
42
10
  });