forked from halo-dev/halo
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add api for markdown export (halo-dev#1199)
* add API for markdown-export * add front-matter support * optimize fileName for markdown-export * fornt-matter与正文中间增加换行符
- Loading branch information
Showing
10 changed files
with
322 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/run/halo/app/model/params/PostMarkdownParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package run.halo.app.model.params; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* @author Raremaa | ||
* @date 2020/12/25 11:22 上午 | ||
*/ | ||
@Data | ||
public class PostMarkdownParam { | ||
|
||
/** | ||
* true if need frontMatter | ||
* default false | ||
*/ | ||
private Boolean needFrontMatter; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package run.halo.app.model.vo; | ||
|
||
import lombok.Data; | ||
import lombok.ToString; | ||
|
||
/** | ||
* Markdown export VO | ||
* | ||
* @author Raremaa | ||
* @date 2020/12/25 9:14 上午 | ||
*/ | ||
@Data | ||
@ToString | ||
public class PostMarkdownVO { | ||
|
||
private String title; | ||
|
||
private String slug; | ||
|
||
private String originalContent; | ||
|
||
private String frontMatter; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.