博主你好,我在使用Icarus 在代码区写完xml后,然后在查看博客的时候,复制我的xml文档到idea中,格式就完全乱了,报了无数个错误 .....可以修复一下吗
Graves 这......有啥问题?
ruibaby 非常感谢您之前修复了代码相关的主题问题。
这一次我遇到了和数学公式有关的问题,在使用ICARUS时,在后台的数学公式都能够正常的渲染,如下图
但是在前端显示时,公式就出现了问题
通过我自己的排查,推测问题应该不是$$引起
$$
应该是由于{}存在,导致了解析出现了问题,比如说 x'_i=x_i-\bar{x} 输出是下面这个样子
{}
x'_i=x_i-\bar{x}
$x'_i=x_i-\bar$
而 x'_i=x_i-\bar x 显示正常
x'_i=x_i-\bar x
希望能够能得到您的帮助。
就是我的代码段用的是xml格式,或者是html格式,在主界面上显示是这样的 然后复制进idea中就格式错误了
xuzhougeng 图片似乎挂了
ruibaby
图片从上往下分别是
小结一下就是:带有{}的公式好像都无法正常显示。
xuzhougeng 好的,晚点我看看
ruibaby 我又测试了一下,发现只有同时出现\和{}才会出现问题。
\
xuzhougeng 我昨晚测试了一下,发现可能和 markdown 解析有关,但是没有查出具体问题
ruibaby 谢谢。那我这边就尽量避免同时用,如果要用,就想办法截图好了。
大佬 这个主题可以上传到阿里云服务器上的/root/.halo/templates/themes目录下吗?
islandlxl 到时候 halo 启动成功后,可以在后台上传或者拉取的。
johnniang 好的,直接在页面上上传是吧。 我是直接下载zip包然后通过sftp上传到/root/.halo/templates/themes目录下,然后启动halo就一直报错😂。
islandlxl 解压了么
johnniang 解压了,然后启动不了halo
islandlxl 提供一下日志信息呢。
johnniang 刚刚试了一下,发现在本地电脑下载的zip文件上传报错,但是用 安装主题的方式上传是成功的 zip报错信息如下:
2019-12-01 08:51:06.784 WARN 13086 --- [ XNIO-1 task-2] r.h.app.service.impl.ThemeServiceImpl : Property file was not found in [/tmp/halo2166038562280755405/hexo-theme-icarus-master/hexo-theme-icarus-master] 2019-12-01 08:51:06.785 INFO 13086 --- [ XNIO-1 task-2] run.halo.app.utils.FileUtils : Deleting [/tmp/halo2166038562280755405] 2019-12-01 08:51:06.816 INFO 13086 --- [ XNIO-1 task-2] run.halo.app.utils.FileUtils : Deleted [/tmp/halo2166038562280755405] successfully 2019-12-01 08:51:06.819 ERROR 13086 --- [ XNIO-1 task-2] r.h.app.core.ControllerExceptionHandler : Captured an exception run.halo.app.exception.ThemePropertyMissingException: /tmp/halo2166038562280755405/hexo-theme-icarus-master/hexo-theme-icarus-master 娌℃湁璇存槑鏂囦欢 at run.halo.app.service.impl.ThemeServiceImpl.lambda$getThemePropertyPath$9(ThemeServiceImpl.java:778) ~[classes!/:1.1.1] at java.util.Optional.orElseThrow(Optional.java:290) ~[na:1.8.0_191] at run.halo.app.service.impl.ThemeServiceImpl.getThemePropertyPath(ThemeServiceImpl.java:778) ~[classes!/:1.1.1] at run.halo.app.service.impl.ThemeServiceImpl.getPropertyOfNullable(ThemeServiceImpl.java:784) ~[classes!/:1.1.1] at run.halo.app.service.impl.ThemeServiceImpl.getProperty(ThemeServiceImpl.java:829) ~[classes!/:1.1.1] at run.halo.app.service.impl.ThemeServiceImpl.add(ThemeServiceImpl.java:443) ~[classes!/:1.1.1] at run.halo.app.service.impl.ThemeServiceImpl.upload(ThemeServiceImpl.java:420) ~[classes!/:1.1.1] at run.halo.app.controller.admin.api.ThemeController.uploadTheme(ThemeController.java:146) ~[classes!/:1.1.1] at run.halo.app.controller.admin.api.ThemeController$$FastClassBySpringCGLIB$$e8e9d45c.invoke(<generated>) ~[classes!/:1.1.1] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at run.halo.app.core.ControllerLogAop.controller(ControllerLogAop.java:41) ~[classes!/:1.1.1] at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at run.halo.app.controller.admin.api.ThemeController$$EnhancerBySpringCGLIB$$99b481d3.uploadTheme(<generated>) ~[classes!/:1.1.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) ~[spring-webmvc-5.1.9.RELEASE.jar!/:5.1.9.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
islandlxl 可能是因为编码导致的错误。
johnniang 以后就加链接下载就可以了