@roottale/cms-renderer-next 0.55.0 → 0.56.0
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/CHANGELOG.md +25 -0
- package/dist/{blog-filter-BQNQL3Mk.d.ts → blog-filter-qE9Lj49C.d.ts} +7 -1
- package/dist/{chunk-FJANIAZN.js → chunk-GDP2VGJR.js} +38 -6
- package/dist/chunk-GDP2VGJR.js.map +1 -0
- package/dist/cms-public.css +16 -3
- package/dist/routes.d.ts +42 -8
- package/dist/routes.js +35 -16
- package/dist/routes.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +8 -3
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-FJANIAZN.js.map +0 -1
package/dist/server.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { CmsPostContent, RootTaleTheme, CmsPostType } from '@roottale/cms-client
|
|
|
3
3
|
export { RootTaleTheme } from '@roottale/cms-client/server';
|
|
4
4
|
import { RootTaleThemeStyle } from '@roottale/ui-react/theme';
|
|
5
5
|
import { Block, BindingResolver, RouteCollection } from '@roottale/cms-core';
|
|
6
|
-
export { a as BlogCategory, B as BlogCategoryWithCount, c as collectCategories, b as collectCategoriesWithCounts, d as defaultCategoryHref, f as filterPostsByCategory } from './blog-filter-
|
|
6
|
+
export { a as BlogCategory, B as BlogCategoryWithCount, c as collectCategories, b as collectCategoriesWithCounts, d as defaultCategoryHref, f as filterPostsByCategory, m as makeCategoryHref } from './blog-filter-qE9Lj49C.js';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
/**
|
package/dist/server.js
CHANGED
|
@@ -4,8 +4,10 @@ import {
|
|
|
4
4
|
collectCollectionCategories,
|
|
5
5
|
defaultCategoryHref,
|
|
6
6
|
filterPostsByCategory,
|
|
7
|
+
makeCategoryHref,
|
|
8
|
+
storedPostPath,
|
|
7
9
|
trimSlash
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GDP2VGJR.js";
|
|
9
11
|
import {
|
|
10
12
|
getSectionNodeRenderer
|
|
11
13
|
} from "./chunk-KSPPYX22.js";
|
|
@@ -664,20 +666,22 @@ import {
|
|
|
664
666
|
resolvePostPath
|
|
665
667
|
} from "@roottale/cms-core";
|
|
666
668
|
function defaultPostHref(post) {
|
|
667
|
-
return `/blog/${post.slug}`;
|
|
669
|
+
return storedPostPath(post) ?? `/blog/${post.slug}`;
|
|
668
670
|
}
|
|
669
671
|
function defaultAuthorHref(slug) {
|
|
670
672
|
return `/blog/author/${slug}`;
|
|
671
673
|
}
|
|
672
674
|
function makeCollectionPostHref(collections) {
|
|
673
675
|
return (post) => {
|
|
676
|
+
const stored = storedPostPath(post);
|
|
677
|
+
if (stored) return stored;
|
|
674
678
|
const path = resolvePostPath(post, collections);
|
|
675
679
|
if (path) return path;
|
|
676
680
|
const collection = resolvePostCollection(post, collections);
|
|
677
681
|
if (collection?.detail === false && collection.basePath) {
|
|
678
682
|
return collection.basePath;
|
|
679
683
|
}
|
|
680
|
-
return
|
|
684
|
+
return `/blog/${post.slug}`;
|
|
681
685
|
};
|
|
682
686
|
}
|
|
683
687
|
|
|
@@ -1842,6 +1846,7 @@ export {
|
|
|
1842
1846
|
extractToc,
|
|
1843
1847
|
filterPostsByCategory,
|
|
1844
1848
|
headingToId,
|
|
1849
|
+
makeCategoryHref,
|
|
1845
1850
|
renderBlock,
|
|
1846
1851
|
renderBlocks,
|
|
1847
1852
|
renderBoundBlocks,
|