Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

steffakasid/asciidoc-blog-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asciidoc-blog-maven-plugin

Introduction

I searched for a way to use the maven-site plugin somehow in a blog like way. That means I wanted to have multiple article/ blog post files which should then be generated into on single html static content page. I didn’t find a way to do this with the maven-site plugin directly so I decided to create a simple maven plugin which could read a YAML file which basically defines the blog posts and generates a main page from this. Also a simple paging is included into the plugin.

Build

$ mvn clean install

Release

$ mvn release:clean
$ mvn release:prepare
$ mvn release:perform

Usage

Add the following to your pom of a maven-site project:

<plugin>
    <groupId>de.steffenrumpf</groupId>
    <artifactId>asciidoc-template-maven-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <configuration>
        <definitionFileName>article_definition.yml</definitionFileName>
        <outputFile>index</outputFile>
        <pageSize>10</pageSize>
    </configuration>
    <executions>
        <execution>
        <phase>generate-sources</phase>
        <goals>
            <goal>generate_blog_posts</goal>
        </goals>
        </execution>
    </executions>
</plugin>

Structure of article definition YAML file

Blog post must be just placed below src/site/ in a typicall maven project. The files can also be structured in folders. Every asciidoc file must define the following metadata:

:post-date: 25-11-20

The post-date will be used to bring all posts into order.

Example Site

My website http://www.steffen-rumpf.de is created using this plugin. The full code can also be found on github.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages