Markdown Page Generator Plugin

联合创作 · 2023-09-30 14:36

这是一个 Maven 的插件,用来实现 Markdown 格式转成 HTML 格式的功能。

插件信息:

<plugin>
    <groupId>com.ruleoftech</groupId>
    <artifactId>markdown-page-generator-plugin</artifactId>
    <version>2.1.0</version>
</plugin>

在 Maven 项目中使用该插件:

<build>
    <plugins>
        <plugin>
            <groupId>com.ruleoftech</groupId>
            <artifactId>markdown-page-generator-plugin</artifactId>
            <version>2.1.0</version>
            <executions>
                <execution>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

也可以自定义头部和尾部:

<plugin>
    <groupId>com.ruleoftech</groupId>
    <artifactId>markdown-page-generator-plugin</artifactId>
    <version>2.1.0</version>
    <executions>
        <execution>
            <phase>process-resources</phase>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <headerHtmlFile>${project.basedir}/src/main/resources/markdown/html/header.html</headerHtmlFile>
        <footerHtmlFile>${project.basedir}/src/main/resources/markdown/html/footer.html</footerHtmlFile>
        <copyDirectories>css,js</copyDirectories>
    </configuration>
</plugin>


浏览 7
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报