lyn4ever29 / halo-plugin-export-md Goto Github PK
View Code? Open in Web Editor NEWexport blogs of halo to markdown
License: GNU General Public License v3.0
export blogs of halo to markdown
License: GNU General Public License v3.0
默认编辑器导出一篇文章500
日志如下
WAL file(s) added, 0 removed, 0 recycled; write=0.903 s, sync=0.004 s, total=0.915 s; sync files=7, longest=0.003 s, average=0.001 s; distance=54 kB, estimate=85 kB; lsn=0/C75F2F0, redo lsn=0/C75F2B8
halo | 2024-03-30T21:56:40.662+08:00 WARN 6 --- [dedElastic-1365] c.l.e.service.impl.ExportServiceImpl : 写文件:HTML-/root/.halo2/plugins/export2doc_files/export/markdown_post/MySQL Explain使用教程.html
halo | 2024-03-30T21:56:40.667+08:00 ERROR 6 --- [tor-tcp-epoll-1] a.w.r.e.AbstractErrorWebExceptionHandler : [20726511-22601] 500 Server Error for HTTP GET "/apis/api.plugin.halo.run/v1alpha1/plugins/export2doc/doExport/export_one/f63944f8-4591-45a8-b2cd-b79838253f81"
halo |
halo | java.lang.ClassCastException: io.github.guqing.cloudinary.ImageOptimizerWebFilter$ImageOptimizerResponseDecorator incompatible with org.springframework.http.ZeroCopyHttpOutputMessage
halo | at cn.lyn4ever.export2md.rest.ExportController.lambda$fetchHeadContent$2(ExportController.java:86) ~[na:na]
halo | Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
halo | Error has been observed at the following site(s):
halo | *__checkpoint ⇢ run.halo.app.security.InitializeRedirectionWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ LogoutPageGeneratingWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
halo | *__checkpoint ⇢ TotpAuthenticationFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
halo | *__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
halo | *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
halo | *__checkpoint ⇢ run.halo.oauth.Oauth2Authenticator [DefaultWebFilterChain]
halo | *__checkpoint ⇢ run.halo.oauth.Oauth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ io.github.guqing.cloudinary.ImageOptimizerWebFilter [DefaultWebFilterChain]
halo | *__checkpoint ⇢ run.halo.app.webfilter.AdditionalWebFilterChainProxy [DefaultWebFilterChain]
halo | *__checkpoint ⇢ HTTP GET "/apis/api.plugin.halo.run/v1alpha1/plugins/export2doc/doExport/export_one/f63944f8-4591-45a8-b2cd-b79838253f81" [ExceptionHandlingWebHandler]
halo | Original Stack Trace:
halo | at cn.lyn4ever.export2md.rest.ExportController.lambda$fetchHeadContent$2(ExportController.java:86) ~[na:na]
halo | at reactor.core.publisher.MonoCallable.call(MonoCallable.java:72) ~[reactor-core-3.6.4.jar:3.6.4]
halo | at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:228) ~[reactor-core-3.6.4.jar:3.6.4]
halo | at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.6.4.jar:3.6.4]
halo | at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.6.4.jar:3.6.4]
halo | at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo | at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo |
halod
作者您好,我本人目前是Hexo的用户,写作都是用的markdown,个人也比较喜欢用markdown来编辑文章而不是系统自带的编辑器,之前halo有过Wordpress的导入插件,但是默认导入之后都是用自带的编辑器编辑的,无法切换成markdown,所以一直比较苦恼,最近发现了您开发的这款插件,非常棒,可以让导入的文章也支持markdown编辑,遂让我萌生了迁移博客平台的想法。
不过经过个人测试,插件识别Markdown的Front-matter里面的内容会发生错误,比如我的这篇内容:
---
title: 【好玩儿的Docker项目】10分钟搭建一个功能更强大的图床——Lsky Pro
date: 2022-06-02 20:18:25.115
updated: 2024-01-18
url: docker-compose-install-lskypro
categories:
- Docker系列
tags:
- 图床
---
url跑到了标题里面,分类目录、标签、发表时间、更新时间等字段无法成功识别。
因为有近240篇markdown的文章导入,一篇一篇改起来工作量会比较大,所以想要恳请是否可以迭代一下插件,使得可以成功识别这些基础字段,非常感谢!
导入提示没有合适的Markdown插件,我已经安装了MD,并且启用。还是说本身就不支持官方的MD插件?
版本2.11
后台文章页面只有回收站,没看到有草稿箱呢
在markdown文件内写了相应的属性,结果导入后被认为是文字,没有将相应的属性注入到对应位置去
可以从repo中把md文件同步导入到博客中,这样只用在vs中写md,然后git一下博客就更新了
目前已经有了 https://github.com/halo-sigs/plugin-migrate 迁移插件,迁移插件实现了从 Halo 旧版本、WordPress 及 RSS 订阅导入数据,同时在开发时也考虑了扩展其他平台数据的情况。
因此建议在 Readme 中提到的后续 Todo 中关于导入相关的内容,可以直接 PR 到现有的迁移插件。
图片因为用的本地的附件库,导出后图片失效了
能否给默认编辑器导出提供一个是否转到 Markdown 格式的选项。默认编辑器目前导出的都是html文件,无法存档转移,然后还能编辑
halo version: 2.14
halo-plugin-export-md version: 1.2.4
导出文章报错如下
2024-05-09T17:16:20.982+08:00 ERROR 7 --- [or-tcp-epoll-27] a.w.r.e.AbstractErrorWebExceptionHandler : [31751624-239534] 500 Server Error for HTTP GET "/apis/api.plugin.halo.run/v1alpha1/plugins/export2doc/doExport/export_one/5152aea5-c2e8-4717-8bba-2263d46e19d5"
java.lang.RuntimeException: java.io.FileNotFoundException: /.halo2/plugins/export2doc_files/export/markdown_post/Hello Halo.html (No such file or directory)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writeContent(ExportServiceImpl.java:227) ~[na:na]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ run.halo.app.security.InitializeRedirectionWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ LogoutPageGeneratingWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ TotpAuthenticationFilter [DefaultWebFilterChain]
*__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ run.halo.app.webfilter.AdditionalWebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ HTTP GET "/apis/api.plugin.halo.run/v1alpha1/plugins/export2doc/doExport/export_one/5152aea5-c2e8-4717-8bba-2263d46e19d5" [ExceptionHandlingWebHandler]
Original Stack Trace:
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writeContent(ExportServiceImpl.java:227) ~[na:na]
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writePost(ExportServiceImpl.java:140) ~[na:na]
at cn.lyn4ever.export2md.rest.ExportController.lambda$fetchHeadContent$2(ExportController.java:83) ~[na:na]
at reactor.core.publisher.MonoCallable.call(MonoCallable.java:72) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:228) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.6.4.jar:3.6.4]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: java.io.FileNotFoundException: /.halo2/plugins/export2doc_files/export/markdown_post/Hello Halo.html (No such file or directory)
at java.base/java.io.FileOutputStream.open(Unknown Source) ~[na:na]
at java.base/java.io.FileOutputStream.<init>(Unknown Source) ~[na:na]
at java.base/java.io.FileOutputStream.<init>(Unknown Source) ~[na:na]
at java.base/java.io.FileWriter.<init>(Unknown Source) ~[na:na]
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writeContent(ExportServiceImpl.java:175) ~[na:na]
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writePost(ExportServiceImpl.java:140) ~[na:na]
at cn.lyn4ever.export2md.rest.ExportController.lambda$fetchHeadContent$2(ExportController.java:83) ~[na:na]
at reactor.core.publisher.MonoCallable.call(MonoCallable.java:72) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:228) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.6.4.jar:3.6.4]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.6.4.jar:3.6.4]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Exception in thread "Thread-228" java.lang.RuntimeException: java.io.FileNotFoundException: /.halo2/plugins/export2doc_files/export/export2doc_20240509172045/Hello Halo.html (No such file or directory)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writeContent(ExportServiceImpl.java:227)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writePost(ExportServiceImpl.java:140)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.lambda$runTask$1(ExportServiceImpl.java:88)
at java.base/java.util.ArrayList.forEach(Unknown Source)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.runTask(ExportServiceImpl.java:87)
at cn.lyn4ever.export2md.rest.ExportController.lambda$export$0(ExportController.java:65)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: /.halo2/plugins/export2doc_files/export/export2doc_20240509172045/Hello Halo.html (No such file or directory)
at java.base/java.io.FileOutputStream.open(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/java.io.FileWriter.<init>(Unknown Source)
at cn.lyn4ever.export2md.service.impl.ExportServiceImpl.writeContent(ExportServiceImpl.java:175)
... 6 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.