halo icon indicating copy to clipboard operation
halo copied to clipboard

提供系统初始化之后生成的默认资源

Open ruibaby opened this issue 3 years ago • 1 comments

你当前使用的版本

2.0.0-prerelease

描述一下此特性

系统初始化之后需要提供一些默认的文章、分类、菜单等,具体清单如下:

  1. 默认文章
  2. 默认分类/标签
  3. 默认菜单组
  4. 默认独立页面

其具体内容我将更新到后续评论。

/kind feature /milestone 2.0 /area core

附加信息

No response

ruibaby avatar Sep 20 '22 03:09 ruibaby

/kind feature /milestone 2.0 /area core

ruibaby avatar Sep 20 '22 04:09 ruibaby

分类:

spec:
  displayName: 默认分类
  slug: default
  description: 这是你的默认分类,如不需要,删除即可。
  cover: ''
  template: ''
  priority: 0
  children: []
status:
  permalink: /categories/default
  posts:
    - name: 5dc244a5-a111-4068-9589-04381ff7048a
      visible: PUBLIC
      published: true
apiVersion: content.halo.run/v1alpha1
kind: Category
metadata:
  finalizers:
    - category-protection
  name: 55372111-6220-4bea-b8a9-1914a3819696
  version: 4
  creationTimestamp: '2022-09-26T09:53:28.508764Z'

标签:

spec:
  displayName: Halo
  slug: halo
  color: '#b16cBe'
  cover: ''
status:
  permalink: /tags/halo
  posts:
    - name: 5dc244a5-a111-4068-9589-04381ff7048a
      visible: PUBLIC
      published: true
apiVersion: content.halo.run/v1alpha1
kind: Tag
metadata:
  finalizers:
    - tag-protection
  name: 78cef80d-0e06-4042-98e4-ff624ce59081
  version: 4
  creationTimestamp: '2022-09-26T09:53:36.787946Z'

文章:

post:
  spec:
    title: Hello Halo
    slug: hello-halo
    releaseSnapshot: Post-5dc244a5-a111-4068-9589-04381ff7048a-v1-snapshot
    headSnapshot: Post-5dc244a5-a111-4068-9589-04381ff7048a-v1-snapshot
    baseSnapshot: Post-5dc244a5-a111-4068-9589-04381ff7048a-v1-snapshot
    owner: ryanwang
    template: ''
    cover: ''
    deleted: false
    published: true
    publishTime: '2022-09-26T09:54:24.041077Z'
    pinned: false
    allowComment: false
    visible: PUBLIC
    version: 1
    priority: 0
    excerpt:
      autoGenerate: true
      raw: ''
    categories:
      - 55372111-6220-4bea-b8a9-1914a3819696
    tags:
      - 78cef80d-0e06-4042-98e4-ff624ce59081
    htmlMetas: []
  status:
    phase: PUBLISHED
    conditions:
      - type: DRAFT
        status: 'TRUE'
        lastTransitionTime: '2022-09-26T09:54:23.966572Z'
        message: ''
        reason: DRAFT
      - type: PUBLISHED
        status: 'TRUE'
        lastTransitionTime: '2022-09-26T09:54:24.041083Z'
        message: ''
        reason: PUBLISHED
    permalink: /archives/hello-halo
    excerpt: >-
      Hello Halo 如果你看到了这一篇文章,那么证明你已经安装成功了,感谢使用 Halo 进行创作,希望能够使用愉快。 相关链接
      官网:https://halo.run 文档:https://docs.halo.run</
    inProgress: false
    contributors:
      - ryanwang
  apiVersion: content.halo.run/v1alpha1
  kind: Post
  metadata:
    finalizers:
      - post-protection
    name: 5dc244a5-a111-4068-9589-04381ff7048a
    labels:
      content.halo.run/deleted: 'false'
      content.halo.run/phase: PUBLISHED
      content.halo.run/visible: PUBLIC
      content.halo.run/owner: ryanwang
    version: 6
    creationTimestamp: '2022-09-26T09:54:23.966575Z'
categories:
  - spec:
      displayName: 默认分类
      slug: default
      description: 这是你的默认分类,如不需要,删除即可。
      cover: ''
      template: ''
      priority: 0
      children: []
    status:
      permalink: /categories/default
      posts:
        - name: 5dc244a5-a111-4068-9589-04381ff7048a
          visible: PUBLIC
          published: true
    apiVersion: content.halo.run/v1alpha1
    kind: Category
    metadata:
      finalizers:
        - category-protection
      name: 55372111-6220-4bea-b8a9-1914a3819696
      version: 4
      creationTimestamp: '2022-09-26T09:53:28.508764Z'
tags:
  - spec:
      displayName: Halo
      slug: halo
      color: '#b16cBe'
      cover: ''
    status:
      permalink: /tags/halo
      posts:
        - name: 5dc244a5-a111-4068-9589-04381ff7048a
          visible: PUBLIC
          published: true
    apiVersion: content.halo.run/v1alpha1
    kind: Tag
    metadata:
      finalizers:
        - tag-protection
      name: 78cef80d-0e06-4042-98e4-ff624ce59081
      version: 4
      creationTimestamp: '2022-09-26T09:53:36.787946Z'
contributors:
  - displayName: Administator
    name: ryanwang

菜单:

spec:
  displayName: 主菜单
  menuItems:
    - bbe8b1b0-fbbe-4cb1-8ee0-c4b0d7c39d75
    - 7c53aee6-976b-4dee-bf93-508f49eb2b97
    - 24cb022e-63db-4ecb-b492-813ffaa83f2b
    - aae6fcd3-93c3-48c6-a545-9feeb0408558
    - 42e3c565-a109-4e6f-b56f-f921f592b706
apiVersion: v1alpha1
kind: Menu
metadata:
  name: ab9e8a76-8f6a-4768-969b-ee48d3cbc283
  version: 5
  creationTimestamp: '2022-09-26T09:54:36.499431Z'

菜单项:

- spec:
    displayName: ''
    href: ''
    priority: 3
    children: []
    singlePageRef:
      version: content.halo.run/v1alpha1
      kind: SinglePage
      name: b35390c3-a22b-4511-9ba0-7ad642c4fd65
  status:
    displayName: 关于
    href: /about
  apiVersion: v1alpha1
  kind: MenuItem
  metadata:
    name: 42e3c565-a109-4e6f-b56f-f921f592b706
    version: 2
    creationTimestamp: '2022-09-26T09:57:52.091192Z'
- spec:
    displayName: ''
    href: ''
    priority: 1
    children: []
    categoryRef:
      version: content.halo.run/v1alpha1
      kind: Post
      name: 55372111-6220-4bea-b8a9-1914a3819696
  status:
    displayName: 默认分类
    href: /categories/default
  apiVersion: v1alpha1
  kind: MenuItem
  metadata:
    name: 7c53aee6-976b-4dee-bf93-508f49eb2b97
    version: 5
    creationTimestamp: '2022-09-26T09:54:48.319117Z'
- spec:
    displayName: ''
    href: ''
    priority: 2
    children: []
    tagRef:
      version: content.halo.run/v1alpha1
      kind: Tag
      name: 78cef80d-0e06-4042-98e4-ff624ce59081
  status:
    displayName: Halo
    href: /tags/halo
  apiVersion: v1alpha1
  kind: MenuItem
  metadata:
    name: aae6fcd3-93c3-48c6-a545-9feeb0408558
    version: 5
    creationTimestamp: '2022-09-26T09:55:47.374780Z'
- spec:
    displayName: 首页
    href: /
    priority: 0
    children: []
  status:
    displayName: 首页
    href: /
  apiVersion: v1alpha1
  kind: MenuItem
  metadata:
    name: bbe8b1b0-fbbe-4cb1-8ee0-c4b0d7c39d75
    version: 5
    creationTimestamp: '2022-09-26T09:54:41.863330Z'

ruibaby avatar Sep 26 '22 10:09 ruibaby

/assign

ruibaby avatar Sep 30 '22 05:09 ruibaby

/close

See https://github.com/halo-dev/console/pull/632 for more

ruibaby avatar Sep 30 '22 15:09 ruibaby

@ruibaby: Closing this issue.

In response to this:

/close

See https://github.com/halo-dev/console/pull/632 for more

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

f2c-ci-robot[bot] avatar Sep 30 '22 15:09 f2c-ci-robot[bot]