From a3934657ad6b999ea25f21c5e709569be6bb506e Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 15 Feb 2019 16:20:43 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../front/FrontOthersController.java | 41 ++++++++- src/main/resources/i18n/messages.properties | 37 ++++++-- .../resources/i18n/messages_en_US.properties | 37 ++++++-- .../resources/i18n/messages_zh_CN.properties | 37 ++++++-- .../templates/admin/admin_page_md_editor.ftl | 21 +++-- .../templates/admin/admin_post_edit.ftl | 6 +- .../templates/admin/admin_post_new.ftl | 4 +- .../resources/templates/admin/admin_theme.ftl | 3 - .../resources/templates/admin/admin_tools.ftl | 24 ++--- .../templates/admin/module/_sidebar.ftl | 2 +- .../resources/templates/common/install.ftl | 91 ------------------- .../resources/templates/common/web/atom.ftl | 47 ++++++++++ 12 files changed, 198 insertions(+), 152 deletions(-) create mode 100644 src/main/resources/templates/common/web/atom.ftl diff --git a/src/main/java/cc/ryanc/halo/web/controller/front/FrontOthersController.java b/src/main/java/cc/ryanc/halo/web/controller/front/FrontOthersController.java index 89d997073..9abfdc15c 100644 --- a/src/main/java/cc/ryanc/halo/web/controller/front/FrontOthersController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/front/FrontOthersController.java @@ -45,11 +45,13 @@ public class FrontOthersController { * 获取文章rss * * @param model model + * * @return String + * * @throws IOException IOException * @throws TemplateException TemplateException */ - @GetMapping(value = {"feed", "feed.xml", "atom", "atom.xml"}, produces = "application/xml;charset=UTF-8") + @GetMapping(value = {"feed", "feed.xml", "rss", "rss.xml"}, produces = "application/xml;charset=UTF-8") @ResponseBody public String feed(Model model) throws IOException, TemplateException { String rssPosts = OPTIONS.get(BlogPropertiesEnum.RSS_POSTS.getProp()); @@ -71,11 +73,45 @@ public class FrontOthersController { return FreeMarkerTemplateUtils.processTemplateIntoString(template, model); } + /** + * 获取 atom.xml + * + * @param model model + * + * @return String + * + * @throws IOException IOException + * @throws TemplateException TemplateException + */ + @GetMapping(value = {"atom", "atom.xml"}, produces = "application/xml;charset=UTF-8") + @ResponseBody + public String atom(Model model) throws IOException, TemplateException { + String rssPosts = OPTIONS.get(BlogPropertiesEnum.RSS_POSTS.getProp()); + if (StrUtil.isBlank(rssPosts)) { + rssPosts = "20"; + } + final Sort sort = new Sort(Sort.Direction.DESC, "postDate"); + final Pageable pageable = PageRequest.of(0, Integer.parseInt(rssPosts), sort); + final Page postsPage = postService.findPostByStatus(0, PostTypeEnum.POST_TYPE_POST.getDesc(), pageable).map(post -> { + if (StrUtil.isNotEmpty(post.getPostPassword())) { + post.setPostContent("该文章为加密文章"); + post.setPostSummary("该文章为加密文章"); + } + return post; + }); + final List posts = postsPage.getContent(); + model.addAttribute("posts", posts); + final Template template = freeMarker.getConfiguration().getTemplate("common/web/atom.ftl"); + return FreeMarkerTemplateUtils.processTemplateIntoString(template, model); + } + /** * 获取 XML 格式的站点地图 * * @param model model + * * @return String + * * @throws IOException IOException * @throws TemplateException TemplateException */ @@ -99,6 +135,7 @@ public class FrontOthersController { * 获取 HTML 格式的站点地图 * * @param model model + * * @return String */ @GetMapping(value = "sitemap.html", produces = {"text/html"}) @@ -119,7 +156,9 @@ public class FrontOthersController { * robots * * @param model model + * * @return String + * * @throws IOException IOException * @throws TemplateException TemplateException */ diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 25964be91..65cdc57aa 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -46,6 +46,7 @@ admin.menu.profile = 个人资料 admin.menu.settings = 设置 admin.menu.blog-settings = 博客设置 admin.menu.blog-backup = 博客备份 +admin.menu.tools = 小工具 # header模块 admin.module.header.a.title.turn-to-front = 跳转到前台 @@ -95,6 +96,16 @@ admin.logs.th.log-action = 触发事件 admin.logs.th.log-result = 产生结果 admin.logs.th.log-datetime = 产生时间 +# tools +admin.tools.title = 小工具 +admin.tools.btn.import = 导入 +admin.tools.markdown.name = Markdown 导入 +admin.tools.markdown.full.name = Markdown 文档导入 +admin.tools.markdown.desc = 支持 Hexo/Jekyll 导入并解析元数据 +admin.tools.wordpress.name = WordPress 导入 +admin.tools.wordpress.full.name = WordPress 数据导入 +admin.tools.wordpress.desc = 尽情期待 + # 附件管理页面 admin.attachments.title = 附件管理 admin.attachments.btn.upload = 上传 @@ -131,11 +142,11 @@ admin.categories.bread.posts = 文章管理 admin.categories.text.all-categories = 所有分类目录 admin.categories.text.edit-category = 修改分类目录 admin.categories.text.add-category = 添加分类目录 -admin.categories.form.cate-name = 名称 +admin.categories.form.cate-name = 名称: admin.categories.form.cate-name-tips = *页面上所显示的名称 -admin.categories.form.cate-url = 路径名称 +admin.categories.form.cate-url = 路径名称: admin.categories.form.cate-url-tips = *这是文章路径上显示的名称,最好为英文 -admin.categories.form.cate-desc = 描述 +admin.categories.form.cate-desc = 描述: admin.categories.form.cate-desc-tips = *添加描述,部分主题可显示 # 评论管理页面 @@ -146,14 +157,14 @@ admin.menus.title = 菜单管理 admin.menus.text.update-menu = 修改菜单 admin.menus.text.all-menus = 所有菜单 admin.menus.text.add-menu = 添加菜单 -admin.menus.form.menu-name = 名称 +admin.menus.form.menu-name = 名称: admin.menus.form.menu-name-tips = *页面上所显示的名称 -admin.menus.form.menu-url = 路径 +admin.menus.form.menu-url = 路径: admin.menus.form.menu-url-tips = *菜单的路径 -admin.menus.form.menu-sort = 排序编号 -admin.menus.form.menu-icon = 图标 +admin.menus.form.menu-sort = 排序编号: +admin.menus.form.menu-icon = 图标: admin.menus.form.menu-icon-tips = *请根据主题的支持选填 -admin.menus.form.menu-target = 打开方式 +admin.menus.form.menu-target = 打开方式: admin.menus.form.menu-target-self = 当前窗口 admin.menus.form.menu-target-blank = 新窗口 @@ -321,9 +332,9 @@ admin.tags.title = 标签 admin.tags.text.edit-tag = 修改标签 admin.tags.text.add-tag = 添加标签 admin.tags.text.all-tags = 所有标签 -admin.tags.form.tag-name = 名称 +admin.tags.form.tag-name = 名称: admin.tags.form.tag-name-tips = *页面上所显示的名称 -admin.tags.form.tag-url = 路径名称 +admin.tags.form.tag-url = 路径名称: admin.tags.form.tag-url-tips = *这是文章路径上显示的名称,最好为英文 # 主题管理页面 @@ -374,6 +385,7 @@ common.btn.define-add = 确定添加 common.btn.editing = 正在修改 common.btn.modify = 修改 common.btn.choose = 选择 +common.btn.remove = 移除 common.radio.display = 显示 common.radio.hide = 隐藏 common.radio.enable = 启用 @@ -446,6 +458,11 @@ admin.editor.js.no-title = 标题不能为空! admin.editor.text.category = 分类目录 admin.editor.text.tag = 标签 admin.editor.select.tag.default = 选择添加 +admin.editor.post.password = 文章密码: +admin.editor.post.date = 发布时间: +admin.editor.page.custom.tpl = 自定义模板: +admin.editor.page.choose.tpl = 选择模板 +admin.editor.page.no.tpl = 无自定义模板 # Java代码 code.admin.login.success = 登录成功! diff --git a/src/main/resources/i18n/messages_en_US.properties b/src/main/resources/i18n/messages_en_US.properties index 984b3672e..d05a4e65c 100644 --- a/src/main/resources/i18n/messages_en_US.properties +++ b/src/main/resources/i18n/messages_en_US.properties @@ -46,6 +46,7 @@ admin.menu.profile = Your Profile admin.menu.settings = Settings admin.menu.blog-settings = Blog Settings admin.menu.blog-backup = Blog Backup +admin.menu.tools = Tools # header module admin.module.header.a.title.turn-to-front = Turn to front @@ -95,6 +96,16 @@ admin.logs.th.log-action = trigger event admin.logs.th.log-result = produces result admin.logs.th.log-datetime = Time of production +# tools +admin.tools.title = Tools +admin.tools.btn.import = Import +admin.tools.markdown.name = Markdown import +admin.tools.markdown.full.name = Markdown document import +admin.tools.markdown.desc = Support Hexo/Jekyll import and analysis meta data +admin.tools.wordpress.name = WordPress import +admin.tools.wordpress.full.name = WordPress data import +admin.tools.wordpress.desc = Look forward to + # attachments page admin.attachments.title = Attachments manage admin.attachments.btn.upload = Upload @@ -131,11 +142,11 @@ admin.categories.bread.posts = Posts management admin.categories.text.all-categories = All categories admin.categories.text.edit-category = Edit category admin.categories.text.add-category = Add category -admin.categories.form.cate-name = Category name +admin.categories.form.cate-name = Category name: admin.categories.form.cate-name-tips = *The name displayed on the page. -admin.categories.form.cate-url = Category url +admin.categories.form.cate-url = Category url: admin.categories.form.cate-url-tips = *This is the name displayed on the article path,preferably in English. -admin.categories.form.cate-desc = Category description +admin.categories.form.cate-desc = Category description: admin.categories.form.cate-desc-tips = *Description of the classification,some topics can be displayed. # comments page @@ -146,14 +157,14 @@ admin.menus.title = Menus manage admin.menus.text.update-menu = Edit menu admin.menus.text.all-menus = All menus admin.menus.text.add-menu = Add menu -admin.menus.form.menu-name = Menu name +admin.menus.form.menu-name = Menu name: admin.menus.form.menu-name-tips = *The name displayed on the page -admin.menus.form.menu-url = Menu url +admin.menus.form.menu-url = Menu url: admin.menus.form.menu-url-tips = *Path to the menu -admin.menus.form.menu-sort = Sort number -admin.menus.form.menu-icon = Menu icon +admin.menus.form.menu-sort = Sort number: +admin.menus.form.menu-icon = Menu icon: admin.menus.form.menu-icon-tips = *Please fill in the support according to the theme -admin.menus.form.menu-target = Open mode +admin.menus.form.menu-target = Open mode: admin.menus.form.menu-target-self = Self admin.menus.form.menu-target-blank = Blank @@ -321,9 +332,9 @@ admin.tags.title = Tags admin.tags.text.edit-tag = Edit tag admin.tags.text.add-tag = Add tag admin.tags.text.all-tags = All tags -admin.tags.form.tag-name = Tag name +admin.tags.form.tag-name = Tag name: admin.tags.form.tag-name-tips = *The name displayed on the page -admin.tags.form.tag-url = Tag url +admin.tags.form.tag-url = Tag url: admin.tags.form.tag-url-tips = *This is the name displayed on the article path, preferably in English # themes page @@ -374,6 +385,7 @@ common.btn.define-add = OK common.btn.editing = Editing common.btn.modify = Modify common.btn.choose = Choose +common.btn.remove = Remove common.radio.display = Display common.radio.hide = Hide common.radio.enable = Enable @@ -446,6 +458,11 @@ admin.editor.js.no-title = The title can not be blank! admin.editor.text.category = Categories admin.editor.text.tag = Tags admin.editor.select.tag.default = Choose to add +admin.editor.post.password = Password: +admin.editor.post.date = Publish Date: +admin.editor.page.custom.tpl = Custom Template: +admin.editor.page.choose.tpl = Choose Template +admin.editor.page.no.tpl = No Template # java code code.admin.login.success = Login successfully! diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties index 25964be91..65cdc57aa 100644 --- a/src/main/resources/i18n/messages_zh_CN.properties +++ b/src/main/resources/i18n/messages_zh_CN.properties @@ -46,6 +46,7 @@ admin.menu.profile = 个人资料 admin.menu.settings = 设置 admin.menu.blog-settings = 博客设置 admin.menu.blog-backup = 博客备份 +admin.menu.tools = 小工具 # header模块 admin.module.header.a.title.turn-to-front = 跳转到前台 @@ -95,6 +96,16 @@ admin.logs.th.log-action = 触发事件 admin.logs.th.log-result = 产生结果 admin.logs.th.log-datetime = 产生时间 +# tools +admin.tools.title = 小工具 +admin.tools.btn.import = 导入 +admin.tools.markdown.name = Markdown 导入 +admin.tools.markdown.full.name = Markdown 文档导入 +admin.tools.markdown.desc = 支持 Hexo/Jekyll 导入并解析元数据 +admin.tools.wordpress.name = WordPress 导入 +admin.tools.wordpress.full.name = WordPress 数据导入 +admin.tools.wordpress.desc = 尽情期待 + # 附件管理页面 admin.attachments.title = 附件管理 admin.attachments.btn.upload = 上传 @@ -131,11 +142,11 @@ admin.categories.bread.posts = 文章管理 admin.categories.text.all-categories = 所有分类目录 admin.categories.text.edit-category = 修改分类目录 admin.categories.text.add-category = 添加分类目录 -admin.categories.form.cate-name = 名称 +admin.categories.form.cate-name = 名称: admin.categories.form.cate-name-tips = *页面上所显示的名称 -admin.categories.form.cate-url = 路径名称 +admin.categories.form.cate-url = 路径名称: admin.categories.form.cate-url-tips = *这是文章路径上显示的名称,最好为英文 -admin.categories.form.cate-desc = 描述 +admin.categories.form.cate-desc = 描述: admin.categories.form.cate-desc-tips = *添加描述,部分主题可显示 # 评论管理页面 @@ -146,14 +157,14 @@ admin.menus.title = 菜单管理 admin.menus.text.update-menu = 修改菜单 admin.menus.text.all-menus = 所有菜单 admin.menus.text.add-menu = 添加菜单 -admin.menus.form.menu-name = 名称 +admin.menus.form.menu-name = 名称: admin.menus.form.menu-name-tips = *页面上所显示的名称 -admin.menus.form.menu-url = 路径 +admin.menus.form.menu-url = 路径: admin.menus.form.menu-url-tips = *菜单的路径 -admin.menus.form.menu-sort = 排序编号 -admin.menus.form.menu-icon = 图标 +admin.menus.form.menu-sort = 排序编号: +admin.menus.form.menu-icon = 图标: admin.menus.form.menu-icon-tips = *请根据主题的支持选填 -admin.menus.form.menu-target = 打开方式 +admin.menus.form.menu-target = 打开方式: admin.menus.form.menu-target-self = 当前窗口 admin.menus.form.menu-target-blank = 新窗口 @@ -321,9 +332,9 @@ admin.tags.title = 标签 admin.tags.text.edit-tag = 修改标签 admin.tags.text.add-tag = 添加标签 admin.tags.text.all-tags = 所有标签 -admin.tags.form.tag-name = 名称 +admin.tags.form.tag-name = 名称: admin.tags.form.tag-name-tips = *页面上所显示的名称 -admin.tags.form.tag-url = 路径名称 +admin.tags.form.tag-url = 路径名称: admin.tags.form.tag-url-tips = *这是文章路径上显示的名称,最好为英文 # 主题管理页面 @@ -374,6 +385,7 @@ common.btn.define-add = 确定添加 common.btn.editing = 正在修改 common.btn.modify = 修改 common.btn.choose = 选择 +common.btn.remove = 移除 common.radio.display = 显示 common.radio.hide = 隐藏 common.radio.enable = 启用 @@ -446,6 +458,11 @@ admin.editor.js.no-title = 标题不能为空! admin.editor.text.category = 分类目录 admin.editor.text.tag = 标签 admin.editor.select.tag.default = 选择添加 +admin.editor.post.password = 文章密码: +admin.editor.post.date = 发布时间: +admin.editor.page.custom.tpl = 自定义模板: +admin.editor.page.choose.tpl = 选择模板 +admin.editor.page.no.tpl = 无自定义模板 # Java代码 code.admin.login.success = 登录成功! diff --git a/src/main/resources/templates/admin/admin_page_md_editor.ftl b/src/main/resources/templates/admin/admin_page_md_editor.ftl index 1f2c4e7b0..81f78136c 100755 --- a/src/main/resources/templates/admin/admin_page_md_editor.ftl +++ b/src/main/resources/templates/admin/admin_page_md_editor.ftl @@ -78,22 +78,22 @@ <#if post??>
- +
<#else>
- +
@@ -120,13 +120,12 @@
- <#if post??> - ')" style="cursor: pointer;"> - <#else > - ')" style="cursor: pointer;"> - + ')" style="cursor: pointer;">
+ @@ -257,6 +256,10 @@ } },'JSON'); } + + function removeThumbnail(){ + $("#selectImg").attr("src","/static/halo-frontend/images/thumbnail/thumbnail.png"); + } diff --git a/src/main/resources/templates/admin/admin_post_edit.ftl b/src/main/resources/templates/admin/admin_post_edit.ftl index a25755cf2..1f367cb13 100644 --- a/src/main/resources/templates/admin/admin_post_edit.ftl +++ b/src/main/resources/templates/admin/admin_post_edit.ftl @@ -68,11 +68,11 @@
- +
- +
@@ -151,7 +151,7 @@ diff --git a/src/main/resources/templates/admin/admin_post_new.ftl b/src/main/resources/templates/admin/admin_post_new.ftl index 2145b16fd..8c46cbdb1 100644 --- a/src/main/resources/templates/admin/admin_post_new.ftl +++ b/src/main/resources/templates/admin/admin_post_new.ftl @@ -66,7 +66,7 @@
- +
@@ -145,7 +145,7 @@ diff --git a/src/main/resources/templates/admin/admin_theme.ftl b/src/main/resources/templates/admin/admin_theme.ftl index f68237501..2f4a45097 100755 --- a/src/main/resources/templates/admin/admin_theme.ftl +++ b/src/main/resources/templates/admin/admin_theme.ftl @@ -27,9 +27,6 @@ font-size: 18px; line-height: 30px; } - #uploadForm{ - display: none; - } .btn-delete:hover{ color: red; } diff --git a/src/main/resources/templates/admin/admin_tools.ftl b/src/main/resources/templates/admin/admin_tools.ftl index 1223e43cf..934ceeaab 100755 --- a/src/main/resources/templates/admin/admin_tools.ftl +++ b/src/main/resources/templates/admin/admin_tools.ftl @@ -1,16 +1,16 @@ <#compress > <#include "module/_macro.ftl"> -<@head>${options.blog_title!} | 小工具 +<@head>${options.blog_title!} | <@spring.message code='admin.tools.title' />
-

小工具

+

<@spring.message code='admin.tools.title' />

@@ -19,18 +19,18 @@

- Markdown 导入 + <@spring.message code='admin.tools.markdown.name' />

- - 导入 + ')"> + <@spring.message code='admin.tools.btn.import' />

-

Markdown 文档导入

-

支持 Hexo/Jekyll 导入并解析元数据

+

<@spring.message code='admin.tools.markdown.full.name' />

+

<@spring.message code='admin.tools.markdown.desc' />

@@ -41,18 +41,18 @@

- WordPress 导入 + <@spring.message code='admin.tools.wordpress.name' />

- 导入 + <@spring.message code='admin.tools.btn.import' />

-

WordPress 数据导入

-

尽请期待

+

<@spring.message code='admin.tools.wordpress.full.name' />

+

<@spring.message code='admin.tools.wordpress.desc' />

diff --git a/src/main/resources/templates/admin/module/_sidebar.ftl b/src/main/resources/templates/admin/module/_sidebar.ftl index cb97ebabc..40e298416 100755 --- a/src/main/resources/templates/admin/module/_sidebar.ftl +++ b/src/main/resources/templates/admin/module/_sidebar.ftl @@ -92,7 +92,7 @@ diff --git a/src/main/resources/templates/common/install.ftl b/src/main/resources/templates/common/install.ftl index 5a99ce98f..c6f95b300 100644 --- a/src/main/resources/templates/common/install.ftl +++ b/src/main/resources/templates/common/install.ftl @@ -120,97 +120,6 @@ <#else >

<@spring.message code='install.installed.message'/>

-
-                                    .'+:
-                                  `+@#'##
-                                   +#.```#+
-                                 `.@` `` .# `
-                                  '+`  `  @,`
-                                  +'`   ``++
-                        ,#@@' `   ++      ;#
-                      .@#'..'#`   ,#      .@               ``.,::;;:,,`
-                     `#+`    '@   `#`     `@         `.:'##@@###+#++#@@#,
-                     .@      `@'   #'     `@  ` `.;+#@@#':..` ``;:    .'@#`
-                     ,@       ,@`  ,@`     @`.'@@##;,`` `      ., `     .## `
-                     `#        #+   #'`    ##@+,.`           ` +         `#+
-                     `#,     ` :#`  .@.   `@.`    .    `      `,`         .#:
-                      ;#       `#,   +#`  `` `   `+';+`       :`        `  '#`
-                      `@:`      ++`:@@#:         +``  +       '    ,.  ;@#``@,
-                     ` ,@`      .@@#:```        .. ##.`:      '`  ;@@.`#@#;`+'
-                        ++       @:  ` ` `.`    , ,#@'`'      ;   #@@' +@@:`,#`
-                         @;      #:  ` ,'` ,+   ..`@@``:      .`  ;@@:``++  .#`
-                        `.@,     ::   ,,  `` #   +``` +`     ``;`` :;   `   .#`
-                          ;@.  `      # `:   `.  `+;;+``      `+`           ,@
-                         `@@#        `, @@@```'  `  `          `:           ;#``
-                        `@+ ;` `     `: @@#` `;```  ` `         ;.          #:
-                        @'`           +``:  `..                  +`      ` .#`
-                       +#             ,.   ` '                    +.`    ``#'
-                      .@.              :'``,+                      ,'.` `.#@. ``
-                      #'                 ..`                         `;';;#`
-                     .@` `                                            ``:@,``
-                   ``#+                                           `    '@,
-                     @`                                           `  `#@``
-                    ;#                                             .'#'` `
-                   `#:                                  ` ` ,;` `,#@+.
-                   `@`                                    :;'@+#@#;``  `
-                  `.#``                                   '#+#@,.  `
-                   ;#                                         @:`
-                   #;                                        `:@
-                   @.                                          #.
-                   @.                                         `+'
-                   @.                                          ;#
-                   @.                                    :`    .@`
-                   @.                                    ;.   ``@`
-                   @.                                    ;,  ` `#
-                   @,                  `                 +.    `@
-                   +'                  ;:                @`     @
-                   ,#`                  +,              :;     `@
-                  ``@`                   +;          ``,#      .@
-                   `#;                    ;#.`      ``'+       ;#`
-                    :@ `                  ` '@',..,;#+.      ``#;
-                     #:                   ` ```:;;:.`         `@`
-                  `` :@                        `    `         ;#``
-                     `#+                                      @,
-                      `@:`                                   +#`
-                       ,#.                                 `,@.`
-                      ` ;@.`                               .@:`
-                         '@,                              .@;`
-                      ```@+#;                         ```;@@  `
-                     ` `@' ,@+`                        ,#@.#'
-                       ## ```+@;                    `,#@'. `@.
-                     `;@ `    ,@#' `      `  `   `;+@@;`    ;@` `
-                      #:       `,@@#',` ` ```.;#@@@;. `  `   @@#,
-               ``   ;@@`           ;+@@@@@@@@##'.`           ,@@@#:`
-                 `+@@@:`           ` ` ```.``   `            `@::#@@'`
-               .#@@+++                `                       ,@` .+@@+.
-   `    `    :#@@;` @,                                         @,   `+@@#.``;#@@@`
-    @@@@#, :@@@: ` ,#                                        ``'#``   `'@@#@@@##@`
-   `;''+@@@#@:`    #'                                          .@``    ` ;@@#.
-       ,#@@:       @`                                           @:      `.@#@@'`
-      '@@'@.      :#                                            '#       `@;`+@#``
-    `'#+ :@.    ``#'                                            .@      ``#+` ;' `
-     .,  #@``     @`                                             @.     ``:@,
-       `.@;      .@                                              ++       `;`
-        `,`     `;#                                              :#
-                `#'                                               @`
-                 @.                                              `@.
-                 @`                                               #'`
-                `@                                                ;#
-                ,#                                                .#
-                ;+                                                `@`
-                #'                                                 @.
-                #:                                                 #:
-                @,                                                `++
-                @`                                                 ;#`
-               `@`                                                 ,@
-               `@`                                                 `@  `
-               `@`                                                 `@`
-               `@`                                                  @`
-               `@`                                                  @.
-               `@`                                                  #: `
-               `@@@@@@@@@##################@@@@@@@@@@@@@@@@@@@@@@@#@@;
-             ` `::::::::::::::::::::::::::::,:::::,,,,,,,,,,,,,,,,,:,.`
-                    
diff --git a/src/main/resources/templates/common/web/atom.ftl b/src/main/resources/templates/common/web/atom.ftl new file mode 100644 index 000000000..4961dc2e3 --- /dev/null +++ b/src/main/resources/templates/common/web/atom.ftl @@ -0,0 +1,47 @@ + + + + ${options.blog_title!} + + ${options.blog_url!} + ${user.userDesc!} + zh-CN + hourly + 1 + https://github.com/ruibaby/halo + + <#if posts?? && posts?size gt 0> + <#list posts as post> + + ${post.postTitle!} + ${options.blog_url!}/archives/${post.postUrl!} + ${options.blog_url!}/archives/${post.postUrl!}#comments + ${post.postDate} + + + <#if post.categories?? && post.categories?size gt 0> + <#list post.categories as cate> + + + + + + + + + + ${post.comments?size} + + + + \ No newline at end of file