@live-change/blog-frontend 0.2.18 → 0.2.19
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/front/src/components/routes.js +5 -5
- package/front/src/router.js +4 -4
- package/index.js +9 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { sitemap } from "@live-change/url-frontend"
|
|
2
2
|
|
|
3
|
-
export function
|
|
3
|
+
export function blogEditRoutes(config = {}) {
|
|
4
4
|
const { prefix = '/', route = (r) => r } = config
|
|
5
5
|
|
|
6
6
|
return [
|
|
@@ -11,7 +11,7 @@ export function contentEditRoutes(config = {}) {
|
|
|
11
11
|
]
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function
|
|
14
|
+
export function catchAllBlogRoute(config = {}) {
|
|
15
15
|
const { prefix = '/', route = (r) => r } = config
|
|
16
16
|
|
|
17
17
|
return [
|
|
@@ -31,13 +31,13 @@ export function routes(config = {}) {
|
|
|
31
31
|
|
|
32
32
|
return [
|
|
33
33
|
|
|
34
|
-
...
|
|
35
|
-
...
|
|
34
|
+
...blogEditRoutes(config),
|
|
35
|
+
...catchAllBlogRoute({ ...config, prefix: config.blogPrefix ?? '/blog/' })
|
|
36
36
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export async function
|
|
40
|
+
export async function blogSitemap(route, api) {
|
|
41
41
|
await sitemap(route, api, 'blog_Post', '/blog/')
|
|
42
42
|
}
|
|
43
43
|
|
package/front/src/router.js
CHANGED
|
@@ -6,25 +6,25 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import { dbAdminRoutes } from "@live-change/db-admin"
|
|
8
8
|
import { userRoutes } from "@live-change/user-frontend"
|
|
9
|
-
import {
|
|
9
|
+
import { catchAllBlogRoute, blogEditRoutes, blogSitemap } from "./components/routes.js"
|
|
10
10
|
|
|
11
11
|
export function blogRoutes(config = {}) {
|
|
12
12
|
const { prefix = '/', route = (r) => r } = config
|
|
13
13
|
return [
|
|
14
14
|
...userRoutes({ ...config, prefix: prefix + 'user/' }),
|
|
15
15
|
|
|
16
|
-
...
|
|
16
|
+
...blogEditRoutes({ ...config }),
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
...dbAdminRoutes({ prefix: '/_db', route: r => ({ ...r, meta: { ...r.meta, raw: true }}) }),
|
|
21
21
|
|
|
22
|
-
...
|
|
22
|
+
...catchAllBlogRoute({ ...config })
|
|
23
23
|
]
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export async function sitemap(route, api) {
|
|
27
|
-
await
|
|
27
|
+
await blogSitemap(route, api)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
|
package/index.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import BlogPost from './front/src/components/BlogPost.vue'
|
|
2
|
+
import BlogPostEditor from './front/src/components/BlogPostEditor.vue'
|
|
3
|
+
import BlogPostPreview from './front/src/components/BlogPostPreview.vue'
|
|
4
|
+
|
|
5
|
+
export { BlogPost, BlogPostEditor, BlogPostPreview }
|
|
6
|
+
|
|
7
|
+
import { catchAllBlogRoute, blogEditRoutes, blogSitemap } from "./front/src/components/routes.js"
|
|
8
|
+
|
|
9
|
+
export { catchAllBlogRoute, blogEditRoutes, blogSitemap }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/blog-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@fortawesome/fontawesome-free": "^6.2.0",
|
|
24
24
|
"@live-change/blog-service": "0.3.8",
|
|
25
25
|
"@live-change/cli": "0.7.6",
|
|
26
|
-
"@live-change/content-frontend": "^0.2.
|
|
26
|
+
"@live-change/content-frontend": "^0.2.19",
|
|
27
27
|
"@live-change/dao": "0.5.8",
|
|
28
28
|
"@live-change/dao-vue3": "0.5.8",
|
|
29
29
|
"@live-change/dao-websocket": "0.5.8",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"author": "",
|
|
66
66
|
"license": "ISC",
|
|
67
67
|
"description": "",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "55b604864ff3fdcc7ab8b4d7665fea92cda0e235"
|
|
69
69
|
}
|