mirror of https://github.com/halo-dev/halo
🐛 修复文章导出的问题
parent
95584a0864
commit
2c78945f11
|
@ -172,13 +172,15 @@ public class BackupController {
|
||||||
content.append("thumbnail: ").append(post.getPostThumbnail()).append("\n");
|
content.append("thumbnail: ").append(post.getPostThumbnail()).append("\n");
|
||||||
if(post.getTags().size()>0){
|
if(post.getTags().size()>0){
|
||||||
content.append("tags:").append("\n");
|
content.append("tags:").append("\n");
|
||||||
for (Tag tag : post.getTags()) {
|
final List<Tag> tags = post.getTags();
|
||||||
|
for (Tag tag : tags) {
|
||||||
content.append(" - ").append(tag.getTagName()).append("\n");
|
content.append(" - ").append(tag.getTagName()).append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(post.getCategories().size()>0){
|
if(post.getCategories().size()>0){
|
||||||
content.append("categories:").append("\n");
|
content.append("categories:").append("\n");
|
||||||
for (Category category : post.getCategories()) {
|
final List<Category> categories = post.getCategories();
|
||||||
|
for (Category category : categories) {
|
||||||
content.append(" - ").append(category.getCateName()).append("\n");
|
content.append(" - ").append(category.getCateName()).append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue