Commit Graph

28 Commits (767aa53a22a4f0d23bb76fcb16a9944f01388548)

Author SHA1 Message Date
guqing 9454f445a5
feat: add the notification mechanism implementation (#4527)
#### What type of PR is this?
/kind feature
/milestone 2.10.x
/area core

#### What this PR does / why we need it:
新增消息和通知机制的实现

how to test it?
1. 执行以下命令配置发件服务
```shell
curl -u admin:admin -X POST 'http://localhost:8090/apis/api.console.halo.run/v1alpha1/notifiers/default-email-notifier/senderConfig' \
--header 'Content-Type: application/json' \
--data-raw '{
    "displayName": "Halo Team",
    "username": "{发件使用的邮箱}",
    "password": "{发件邮箱密码}",
    "host": "smtp.exmail.qq.com",
    "port": "587"
}'
```
2. 评论文章或页面可以收到通知
3. 文章/页面作者是评论者不发送新评论通知,回复者是评论作者不发送回复通知

#### Which issue(s) this PR fixes:
Fixes #4045

#### Does this PR introduce a user-facing change?
```release-note
新增消息和通知机制的实现
```
2023-09-28 13:32:23 +00:00
John Niang a29c608311
Support for personal access token mechanism (#4598)
#### What type of PR is this?

/kind feature
/kind api-change
/area core

#### What this PR does / why we need it:

Support for personal access token mechanism.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/1309

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
提供个人访问令牌机制
```
2023-09-25 03:30:14 +00:00
John Niang bd912c36b9
Support backup and restore (#4206)
#### What type of PR is this?

/kind feature
/area core

#### What this PR does / why we need it:

See 9921deb076/docs/backup-and-restore.md for more.

<img width="1906" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/41531186-d305-44fd-8bdc-30df9b71af43">
<img width="1909" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/3d7af1b9-37ad-4a40-9b81-f15ed0f1f6e8">


#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4059
Fixes https://github.com/halo-dev/halo/issues/3274

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
支持备份和恢复功能。
```
2023-07-24 08:26:16 +00:00
John Niang 0d387eddf3
Enable configuration caching with separate names (#4151)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.7.x

#### What this PR does / why we need it:

Refactor configuration properties to configure caching with separate names, so that we can enable / disable cache with name.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4144

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-06-29 07:02:11 +00:00
guqing cabcd98ef4
feat: add content extension points for post and single page on theme-side (#4080)
#### What type of PR is this?
/kind feature
/milestone 2.7.x
/area core

#### What this PR does / why we need it:
为主题端的文章和自定义页面内容添加扩展点
插件可以通过实现扩展点来干预文章和自定义页面的内容显示,如修改内容的 html 结构,改变特定样式等

使用方式参考:[docs/extension-points/content.md](9b2b9f1837)

#### Which issue(s) this PR fixes:

Fixes #4003

#### Does this PR introduce a user-facing change?

```release-note
为主题端的文章和自定义页面内容添加扩展点
```
2023-06-28 15:30:11 +00:00
John Niang d0526ec592
Add support for caching template rendering result (#4091)
#### What type of PR is this?

/kind feature
/area core

#### What this PR does / why we need it:

This PR adds dependency [spring-boot-starter-cache](https://docs.spring.io/spring-boot/docs/current/reference/html/io.html#io.caching) as cache framework and [caffeine](https://github.com/ben-manes/caffeine/wiki) as cache implementation to cache template rendering result.

By default, we disable the cache feature. If you want to enable it, please try to configure properties like this:

```yaml
halo:
  cache:
    disabled: false
```

#### Which issue(s) this PR fixes:

Fixes #2827 

#### Special notes for your reviewer:

1. Start Halo
2. Browse any page twice
3. See the difference in request times

#### Does this PR introduce a user-facing change?

```release-note
支持模板渲染结果缓存
```
2023-06-26 14:38:00 +00:00
John Niang 31740e732f
Support configuration properties mechanism for plugin in Halo core (#4043)
#### What type of PR is this?

/kind feature
/area core
/area plugin

#### What this PR does / why we need it:

This PR adds property sources into PluginApplicationContext environment to support configuration properties mechanism.

See https://github.com/halo-dev/halo/issues/4015 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4015

#### Special notes for your reviewer:

You can verify the mechanism in [plugin-starter](https://github.com/halo-dev/plugin-starter) according to documentation `docs/developer-guide/plugin-configuration-properties.md`.

I've only tested it on macOS, looking forward to feedback on Windows.

#### Does this PR introduce a user-facing change?

```release-note
支持在插件中定义 @ConfigurationProperties 注解
```
2023-06-07 09:55:23 +00:00
John Niang dac4eecea6
Implement full-text search of posts with Lucene default (#2675)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.0

#### What this PR does / why we need it:

This PR mainly implement full-text search of posts and provide extension point for other search engine.

Meanwhile, I implement ExtensionGetter to get implemention(s) of extension point from system ConfigMap.

But there still are something to do here:

- [x] Udpate documents when posts are published or posts are becoming unpublic.
- [x] Delete documents when posts are unpublished or deleted.

Because I'm waiting for https://github.com/halo-dev/halo/pull/2659 got merged.

I create two endpoints:

1. For full-text search of post

    ```bash
    curl -X 'GET' \
      'http://localhost:8090/apis/api.halo.run/v1alpha1/indices/post?keyword=halo&limit=10000&highlightPreTag=%3CB%3E&highlightPostTag=%3C%2FB%3E' \
      -H 'accept: */*'
    ```

1. For refreshing indices

    ```bash
    curl -X 'POST' \
      'http://localhost:8090/apis/api.console.halo.run/v1alpha1/indices/post' \
      -H 'accept: */*' \
      -d ''
    ```

#### Which issue(s) this PR fixes:

Fixes #https://github.com/halo-dev/halo/issues/2637

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
提供文章全文搜索功能并支持搜索引擎扩展
```
2022-11-11 16:12:13 +00:00
John Niang af8860ffb6
Refine logic of form login and logout (#2528)
#### What type of PR is this?

/kind improvement
/kind api-change
/area core
/milestone 2.0

#### What this PR does / why we need it:

Please see b092b390b7/docs/authentication/README.md

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2506

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
优化系统登录和登出逻辑
```
2022-10-11 08:04:14 +00:00
guqing a39cf2645e
refactor: rename api group for custom api (#2419)
#### What type of PR is this?
/kind improvement
/kind api-change
/area core
/milestone 2.0

#### What this PR does / why we need it:
- 修改管理后台使用的自定义 API 的 group 为 `api.console.halo.run`
- 面向三方应用的自定义 API 的 group 为 `api.halo.run`
- 插件的自定义 API 的 group 为 `api.plugin.halo.run`

#### Which issue(s) this PR fixes:

Fixes #2418

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-09-19 16:24:35 +00:00
John Niang 3f7cb58370
Add support for custom endpoints (#2223)
* Support to add custom endpoints

Signed-off-by: johnniang <johnniang@fastmail.com>

* Update docs/developer-guide/custom-endpoint.md

Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>

Co-authored-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
2022-07-08 04:40:13 +00:00
John Niang e52db6859f
Add feature to generate APIs for schemes automatically (#2158)
* Add ExtensionEndpointInstaller

* Refactor Schemes with SchemeManager

* Add some unit tests

1. Add ExtensionCompositeRouterFunctionTest
2. Add ExtensionConfigurationTest
3. Refactor Unstructured
4. Fix bad ObjectMapper in Json converter.

* Fix bad scheme registration
2022-06-16 03:10:14 +00:00
John Niang 1024f71635
Replace webmvc with webflux (#2138)
* Replace webmvc to webflux

Signed-off-by: johnniang <johnniang@fastmail.com>

* Remove jetty dependency

Signed-off-by: johnniang <johnniang@fastmail.com>

* Refactor authentication module

* Refactor authentication module

* Migrate authorization module

* Refactor Login components

* Fix broken imports

* Upgrade springdoc version

* Refine security matcher using pathMatchers utility
2022-06-07 02:20:12 +00:00
ruibaby d63f7943b4 🎨 代码优化 2019-01-05 17:16:56 +08:00
ruibaby 1d23670b5d 📝 更新README 2018-12-29 13:01:31 +08:00
ruibaby b609ecbec1 📝 更新README 2018-12-26 10:58:26 +08:00
ruibaby 7122fd91e4 📝 更新README 2018-12-25 09:47:46 +08:00
ruibaby 00e278223b 📝 更新README 2018-12-23 18:56:04 +08:00
ruibaby 44565e1d40 📝 更新README 2018-12-21 19:50:10 +08:00
ruibaby 1a937d514c 📝 更新README 2018-12-21 19:44:34 +08:00
ruibaby 1eed9b188c 📝 更新README 2018-12-16 10:44:58 +08:00
ruibaby e30b01f858 📝 更新README 2018-12-09 12:56:00 +08:00
ruibaby 19970fc100 📝 更新README 2018-12-08 15:52:23 +08:00
ruibaby 91eca6db34 0.1.1 2018-12-08 10:44:29 +08:00
ruibaby d78aefd49d 📝 更新README 2018-11-05 11:56:57 +08:00
ruibaby e2c2468be2 📝 更新README 2018-10-27 23:47:13 +08:00
ruibaby b821737718 📝 更新README 2018-10-18 23:11:31 +08:00
ruibaby ca9f019854 🎨 后台UI细节优化 2018-10-17 22:46:24 +08:00