Skip to content

hanggrian/pages-gradle-plugin

Repository files navigation

CircleCI Plugin Portal Java

Pages Gradle Plugin

Static webpages generator for GitHub pages.

Download

Using plugins DSL:

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

Using legacy plugin application:

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

apply plugin: 'com.hanggrian.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')
    }
}

Materialist theme preview.

pages {
    materialist {
        darkMode.set(true)
    }
}

Cayman theme preview.

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

Minimal theme preview.

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