中文 | ENGLISH

OpooPress

A java based static website generator.

Basic Usage

Ver: 1.x

1. Commands for Java Developer

Command format is mvn op:command -Dparam1=val1 -Dparam2=var2 ....

You can execute more than one goals in one command, like mvn op:command1 op:command2 ... -Dparam1=val1 -Dparam2=var2 ....

Available goals of this plugin:

  • op:install - Install and initialize site/blog
  • op:sass-compile - Compile the SASS files into css
  • op:generate - Generate static site/blog
  • op:build - Generate static site/blog, same as generate
  • op:preview - Start a web server for preview, monitor the site for changes and generate whenever it does
  • op:deploy - Deploy site/blog to remote or local server
  • op:clean - Clean site/blog templates cache and temp files
  • op:new-page - Create new page file
  • op:new-post - Create new post file
  • op:sass-watch - Watch the SASS for changes and compile whenever it does.
  • op:wordpress-import - Import posts and pages from the XML file that exported from WordPress

Click the link to see maven document for more information about the goal.

Note

  • Goal op:generate is same as goal op:build.
  • The plugin set goalPrefix as op, so we can use mvn op:install, mvn op:generate or mvn opoopress:install, mvn opoopress:generate.

OpooPress Phases

  1. Install & Initialize
    • Core function: Install and initialize blog/site
    • Goals: op:install, op:clean
  2. Build Theme
    • Core function: build theme
    • Goals: op:sass-compile, op:sass-watch, op:new-post, op:new-page, op:import
  3. Generate Site
    • Core function: generate static site
    • Goals: op:generate, op:build
  4. Preview & Deploy
    • Core function: no
    • Goals: op:preview, op:deply

There are two rules for these phases:

  • The previous phase core function will be executed first before the execution of any current phase goals.
  • The previous phase core function will be executed first before the execution of current phase core function.

Examples:

  • op:preview: the dependency chain will be op:preview -> Generate Site -> Build Theme -> Install & Initialize, and the execution order will be Install & Initialize -> Build Theme -> Generate Site -> Start Preview
  • op:new-post: the dependency chain will be op:new-post -> Install & Initialize, and the execution order will be Install & Initialize -> Create new post.

2. Commands for Non-Developer

Command format is `op command [options].

for Windows ONLY currently

Command list:

  • install - Install and initialize site/blog
  • sass-compile - Compile the SASS files into css
  • generate - Generate static site/blog
  • build - Generate static site/blog, same as generate
  • preview - Start a web server for preview, monitor the site for changes and generate whenever it does
  • deploy - Deploy site/blog to remote or local server
  • clean - Clean site/blog templates cache and temp files
  • new-page - Create new page file
  • new-post - Create new post file
  • sass-watch - Watch the SASS for changes and compile whenever it does.
  • wordpress-import - Import posts and pages from the XML file that exported from WordPress

Examples:

  • Initialize a new blog: D:\opoopress-${site.op_current_version}>op install
  • Preview blog in browser: D:\opoopress-${site.op_current_version}>op preview
  • Deploy blog to server: D:\opoopress-${site.op_current_version}>op deploy

Comments