github halo-dev/halo v0.0.8
0.0.8

latest releases: v2.16.0-rc.2, v2.16.0-rc.1, v2.15.2...
5 years ago

New features

  • 发布文章的时候,没有缩略图会自动添加一张。
  • 支持i18n,并带有英文语言包,后台可自行切换语言。
  • 新增各大搜索平台验证代码的入口,需要主题支持。
  • 全局美化checkbox和radio。

Changes

  • 后台Favicon更新。
  • 更改附件目录为用户目录下的halo/upload,需要将原来的附件目录upload移动到用户目录下的halo文件夹。
  • 更换编辑器,由editor.md更换为simplemde,支持图片拖动上传。
  • 下载的主题不需要再更改为指定文件夹名才能上传。

Fixed

  • 修复评论框在某些主题下样式错乱的问题。
  • 修复编辑文章的时候,分类目录不回显的问题。
  • 修复Material主题第一次使用样式混乱的问题。

注意

因为支持了i18n,所以更新的时候需要修改application.yaml配置文件。

server:
  port: 8090
  use-forward-headers: true
  undertow:
    io-threads: 2
    worker-threads: 36
    buffer-size: 1024
    directBuffers: true
spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource

    # H2database 配置
    driver-class-name: org.h2.Driver
    url: jdbc:h2:file:~/halo/halo
    username: admin
    password: 123456

    #MySql配置
#    driver-class-name: com.mysql.jdbc.Driver
#    url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false
#    username: root
#    password: 123456

  h2:
    console:
      settings:
        web-allow-others: true
      path: /h2-console
      enabled: true
  jpa:
    hibernate:
      ddl-auto: update
    show-sql: false
  freemarker:
    allow-request-override: false
    cache: false
    check-template-location: true
    charset: utf-8
    content-type: text/html
    expose-request-attributes: false
    expose-session-attributes: false
    expose-spring-macro-helpers: true
    suffix: .ftl
    settings:
      auto_import: /spring.ftl as spring
  servlet:
    multipart:
      max-file-size: 10MB
      max-request-size: 10MB

  # 多语言资源文件路径
  messages:
    basename: i18n/messages
logging:
  file: ./logs/log.log

如上代码,修改的地方有:

  1. expose-spring-macro-helpers: false(原),现为true。
  2. freemarker添加了settings:auto_import: /spring.ftl as spring(注意按照上面的格式)。
  3. spring节点添加了messages:basename: i18n/messages(注意按照上面的格式)。

修改方法

  1. 将原有的application.yaml备份(重命名)。
  2. 复制新的application.yaml文件到resources下。
  3. 按照原来的配置文件修改application.yaml文件,需要修改端口号,数据库配置等。

Don't miss a new halo release

NewReleases is sending notifications on new releases.