mirror of https://github.com/halo-dev/halo
commit
61caec9403
|
@ -12,6 +12,7 @@ import run.halo.app.event.options.OptionUpdatedEvent;
|
||||||
import run.halo.app.event.theme.ThemeActivatedEvent;
|
import run.halo.app.event.theme.ThemeActivatedEvent;
|
||||||
import run.halo.app.event.user.UserUpdatedEvent;
|
import run.halo.app.event.user.UserUpdatedEvent;
|
||||||
import run.halo.app.handler.theme.config.support.ThemeProperty;
|
import run.halo.app.handler.theme.config.support.ThemeProperty;
|
||||||
|
import run.halo.app.model.support.HaloConst;
|
||||||
import run.halo.app.service.OptionService;
|
import run.halo.app.service.OptionService;
|
||||||
import run.halo.app.service.ThemeService;
|
import run.halo.app.service.ThemeService;
|
||||||
import run.halo.app.service.ThemeSettingService;
|
import run.halo.app.service.ThemeSettingService;
|
||||||
|
@ -90,6 +91,7 @@ public class FreemarkerConfigAwareListener {
|
||||||
private void loadOptionsConfig() throws TemplateModelException {
|
private void loadOptionsConfig() throws TemplateModelException {
|
||||||
configuration.setSharedVariable("options", optionService.listOptions());
|
configuration.setSharedVariable("options", optionService.listOptions());
|
||||||
configuration.setSharedVariable("context", optionService.getBlogBaseUrl());
|
configuration.setSharedVariable("context", optionService.getBlogBaseUrl());
|
||||||
|
configuration.setSharedVariable("version", HaloConst.HALO_VERSION);
|
||||||
log.debug("Loaded options");
|
log.debug("Loaded options");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -330,6 +330,7 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
||||||
tag = tagService.create(tag);
|
tag = tagService.create(tag);
|
||||||
}
|
}
|
||||||
tagIds.add(tag.getId());
|
tagIds.add(tag.getId());
|
||||||
|
break;
|
||||||
case "categories":
|
case "categories":
|
||||||
Category category = categoryService.getByName(ele);
|
Category category = categoryService.getByName(ele);
|
||||||
if (null == category) {
|
if (null == category) {
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
|
|
||||||
<#-- favicon -->
|
<#-- favicon -->
|
||||||
<#macro favicon>
|
<#macro favicon>
|
||||||
|
<#if options.blog_favicon?? && options.blog_favicon!=''>
|
||||||
<link rel="shortcut icon" type="images/x-icon" href="${options.blog_favicon!}">
|
<link rel="shortcut icon" type="images/x-icon" href="${options.blog_favicon!}">
|
||||||
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#-- 站点验证代码 -->
|
<#-- 站点验证代码 -->
|
||||||
|
@ -46,11 +48,12 @@
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro globalHeader>
|
<#macro globalHeader>
|
||||||
<@favicon />
|
<meta name="generator" content="Halo ${version!}" />
|
||||||
<@verification />
|
<@verification />
|
||||||
|
<@favicon />
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro globalFooter>
|
<#macro globalFooter>
|
||||||
<@statistics />
|
|
||||||
<@footer_info />
|
<@footer_info />
|
||||||
|
<@statistics />
|
||||||
</#macro>
|
</#macro>
|
|
@ -1,4 +1,4 @@
|
||||||
<#include "/common/macro/common_macro.ftl">
|
<#import "/common/macro/common_macro.ftl" as common>
|
||||||
<#macro head title,keywords,description>
|
<#macro head title,keywords,description>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -14,8 +14,7 @@
|
||||||
<meta name="author" content="${user.nickname!}" />
|
<meta name="author" content="${user.nickname!}" />
|
||||||
<meta name="keywords" content="${keywords!}"/>
|
<meta name="keywords" content="${keywords!}"/>
|
||||||
<meta name="description" content="${description!}" />
|
<meta name="description" content="${description!}" />
|
||||||
<@verification />
|
<@common.globalHeader />
|
||||||
<@favicon />
|
|
||||||
<link href="${static!}/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
<link href="${static!}/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
||||||
<link rel="stylesheet" href="${static!}/source/css/blog_basic.min.css?version=88107691fe">
|
<link rel="stylesheet" href="${static!}/source/css/blog_basic.min.css?version=88107691fe">
|
||||||
<link href="${static!}/source/css/style.min.css" type="text/css" rel="stylesheet" />
|
<link href="${static!}/source/css/style.min.css" type="text/css" rel="stylesheet" />
|
||||||
|
@ -77,7 +76,7 @@
|
||||||
xhr.send();
|
xhr.send();
|
||||||
</#if>
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
<@statistics />
|
<@common.statistics />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo!</a>
|
<a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo!</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer_text">
|
<div class="footer_text">
|
||||||
<@footer_info></@footer_info>
|
<@common.footer_info />
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue