diff --git a/CHANGE_LOGS.md b/CHANGE_LOGS.md new file mode 100644 index 000000000..a689b95a9 --- /dev/null +++ b/CHANGE_LOGS.md @@ -0,0 +1,17 @@ +## v3.6.1 / 2020-01-25 + +### 引入特性 + +* [编辑器 Vditor 所见即所得](https://github.com/88250/symphony/issues/3) + +### 改进功能 + +* [更新项目地址相关链接](https://github.com/88250/symphony/issues/2) + +### 开发重构 + +* [日志组件迁移到 log4j2](https://github.com/88250/symphony/issues/4) + +### 修复缺陷 + +* [命令行参数 server_scheme 失效](https://github.com/88250/symphony/issues/1) diff --git a/CHANGE_LOGS.html b/CHANGE_LOGS_2013-2019.html similarity index 100% rename from CHANGE_LOGS.html rename to CHANGE_LOGS_2013-2019.html diff --git a/package-lock.json b/package-lock.json index b7b7d1dd8..fa01573bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "Symphony", - "version": "3.6.0", + "version": "3.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7cf98a830..22df6a92b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Symphony", - "version": "3.6.0", + "version": "3.6.1", "description": "A modern community (forum/BBS/SNS/blog) platform written in Java. 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台。", "homepage": "https://sym.b3log.org", "repository": { diff --git a/pom.xml b/pom.xml index 5947cb250..581ecacd1 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ @@ -12,7 +12,7 @@ org.b3log symphony jar - 3.6.0 + 3.6.1 Symphony https://sym.b3log.org diff --git a/src/main/java/org/b3log/symphony/Server.java b/src/main/java/org/b3log/symphony/Server.java index 9d32733ea..18b4288cc 100644 --- a/src/main/java/org/b3log/symphony/Server.java +++ b/src/main/java/org/b3log/symphony/Server.java @@ -44,7 +44,7 @@ * Server. * * @author Liang Ding - * @version 2.0.1.0, Dec 1, 2019 + * @version 2.0.1.1, Jan 25, 2020 * @since 3.4.8 */ public final class Server extends BaseServer { @@ -57,7 +57,7 @@ public final class Server extends BaseServer { /** * Symphony version. */ - public static final String VERSION = "3.6.0"; + public static final String VERSION = "3.6.1"; /** * Main. diff --git a/src/main/java/org/b3log/symphony/processor/IndexProcessor.java b/src/main/java/org/b3log/symphony/processor/IndexProcessor.java index a51a76151..1bf52e470 100644 --- a/src/main/java/org/b3log/symphony/processor/IndexProcessor.java +++ b/src/main/java/org/b3log/symphony/processor/IndexProcessor.java @@ -17,6 +17,7 @@ */ package org.b3log.symphony.processor; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.b3log.latke.Keys; import org.b3log.latke.Latkes; @@ -28,6 +29,7 @@ import org.b3log.latke.http.annotation.RequestProcessing; import org.b3log.latke.http.annotation.RequestProcessor; import org.b3log.latke.http.renderer.AbstractFreeMarkerRenderer; +import org.b3log.latke.http.renderer.TextHtmlRenderer; import org.b3log.latke.ioc.Inject; import org.b3log.latke.model.Pagination; import org.b3log.latke.service.LangPropsService; @@ -45,10 +47,13 @@ import org.b3log.symphony.service.DataModelService; import org.b3log.symphony.service.UserMgmtService; import org.b3log.symphony.service.UserQueryService; +import org.b3log.symphony.util.Markdowns; import org.b3log.symphony.util.Sessions; import org.b3log.symphony.util.Symphonys; import org.json.JSONObject; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.util.*; /** @@ -102,6 +107,25 @@ public class IndexProcessor { @Inject private LangPropsService langPropsService; + /** + * Show changelogs. + * + * @param context the specified context + */ + @RequestProcessing("/CHANGE_LOGS.html") + public void showChangelogs(final RequestContext context) { + try { + final TextHtmlRenderer renderer = new TextHtmlRenderer(); + context.setRenderer(renderer); + try (final InputStream resourceAsStream = IndexProcessor.class.getResourceAsStream("/CHANGE_LOGS.md")) { + final String content = IOUtils.toString(resourceAsStream, StandardCharsets.UTF_8); + renderer.setContent(Markdowns.toHTML(content)); + } + } catch (final Exception e) { + context.sendStatus(500); + } + } + /** * Shows question articles. * diff --git a/src/main/resources/CHANGE_LOGS.html b/src/main/resources/CHANGE_LOGS.html deleted file mode 100644 index 9d01dd8ca..000000000 --- a/src/main/resources/CHANGE_LOGS.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - Sym Change Logs - - - - - - -

Release 3.6.0 - Nov 12, 2019

- -

Release 3.5.1 - Aug 19, 2019

- -

Release 3.5.0 - May 17, 2019

- -

Release 3.4.8 - Mar 26, 2019

- -

Release 3.4.7 - Feb 22, 2019

- -

Release 3.4.6 - Jan 10, 2019

- -

Release 3.4.5 - Dec 7, 2018

- -

Release 3.4.4 - Nov 22, 2018

- -

Release 3.4.3 - Nov 8, 2018

- -

Release 3.4.2 - Oct 24, 2018

- -

Release 3.4.1 - Sep 27, 2018

- -

Release 3.4.0 - Sep 6, 2018

- -

Release 3.3.0 - Aug 29, 2018

- -

Release 3.2.0 - Aug 2, 2018

- -

Release 3.1.0 - Jul 12, 2018

- -

Release 3.0.0 - Jun 13, 2018

- -

Release 2.8.0 - May 25, 2018

- -

Release 2.7.0 - May 4, 2018

- -

Release 2.6.0 - Apr 10, 2018

- -

Release 2.5.0 - Mar 14, 2018

- -

Release 2.4.0 - Feb 7, 2018

- -

Release 2.3.0 - Dec 13, 2017

- -

Release 2.2.0 - Nov 1, 2017

- -

Release 2.1.0 - May 18, 2017

- -

Release 2.0.0 - Mar 7, 2017

- -

Release 1.9.0 - Jan 12, 2017

- -

Release 1.8.0 - Dec 26, 2016

- -

Release 1.7.0 - Dec 7, 2016

- -

Release 1.6.0 - Oct 19, 2016

- -

Release 1.5.0 - Aug 19, 2016

- -

Release 1.4.0 - Jul 29, 2016

- -

Release 1.3.0 - Oct 15, 2015

- -

Release 1.0.0 - Jan 18, 2015

- -

Release 0.2.5 - Mar 28, 2014

- -

Release 0.2.1 - Aug 25, 2013

- - - diff --git a/src/main/resources/CHANGE_LOGS.md b/src/main/resources/CHANGE_LOGS.md new file mode 100644 index 000000000..a689b95a9 --- /dev/null +++ b/src/main/resources/CHANGE_LOGS.md @@ -0,0 +1,17 @@ +## v3.6.1 / 2020-01-25 + +### 引入特性 + +* [编辑器 Vditor 所见即所得](https://github.com/88250/symphony/issues/3) + +### 改进功能 + +* [更新项目地址相关链接](https://github.com/88250/symphony/issues/2) + +### 开发重构 + +* [日志组件迁移到 log4j2](https://github.com/88250/symphony/issues/4) + +### 修复缺陷 + +* [命令行参数 server_scheme 失效](https://github.com/88250/symphony/issues/1) diff --git a/src/main/resources/static-resources.xml b/src/main/resources/static-resources.xml index f95972c19..f2224ab4e 100644 --- a/src/main/resources/static-resources.xml +++ b/src/main/resources/static-resources.xml @@ -20,7 +20,7 @@ --> @@ -105,5 +105,4 @@ -