pages-gradle-plugin

Static webpages generator for GitHub pages

View the Project on GitHub hendraanggrian/pages-gradle-plugin

Travis CI Plugin Portal OpenJDK

Pages Gradle Plugin

Static webpages generator for GitHub pages.

Download

Using plugins DSL:

plugins {
    id('com.hendraanggrian.pages') version "$version"
}

Using legacy plugin application:

buildscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath("com.hendraanggrian:pages-gradle-plugin:$version")
    }
}

apply plugin: 'com.hendraanggrian.pages'

Usage

Configure base extension, then select one of the available themes.

pages {
    // custom local resources
    resources {
        from('images')
    }
    // map markdown files to HTML
    contents {
        index('README.md')
        add('About.md', 'about.html')
    }
    // enables prism syntax highlighter
    prism {
        version = '1.28.0'
        theme = 'dark'
        languages = ['java', 'kotlin]
    }
}

Minimal Theme

Minimal theme preview.

pages {
    minimal {
        authorName.set('Hendra Anggrian')
        projectName.set('My Project')
        projectDescription.set('A very awesome project')
        markdownFile.set(file('path/to/README.md'))
        headerButtons {
            button('Download', 'Sources', 'https://somewhere.com')
        }
    }
}

Cayman Theme

Cayman theme preview.

pages {
    cayman {
        authorName.set('Hendra Anggrian')
        projectName.set('My Project')
        projectDescription.set('A very awesome project')
        markdownFile.set(file('path/to/README.md'))
        headerButtons {
            button('Download', 'Sources', 'https://somewhere.com')
        }
    }
}