GithubHelp home page GithubHelp logo

static-phantom-renderer-brunch's Introduction

static-phantom-renderer-brunch

Render static pages of your application with phantomjs. It will work with --optimize only. It will start a webserver or using the configured host, rendering each path with phantomjs and saving the resulting html into public/:path/index.html.

Installation

You can install phantomjs with homebrew

brew install phantomjs

Config

	imageoptimizer:
		paths: ['', 'projects', 'projects/[0..3]', 'team'] # required: list of paths to render
		host: http://localhost:8080 # optional, host used to render

Paths should be a list of strings, each representing a page to be rendered. You can indicate id ranges with [a..b]. If host is omitted, it will start a node http-server serving the public folder. But you can use this option to start a server by yourself before building the project.

If you want to preserve the beginning or the end of the document from beihng changed by your javascript, you can use the following comments in your index.html:

<!-- static-renderer BEGIN -->

Everything before that comment will be copied from app/assets/index.html instead of being evaluated via phantomjs.

<!-- static-renderer END -->

Everything after that comment will be copied from app/assets/index.html instead of being evaluated via phantomjs.

Usage

Add "static-phantom-renderer-brunch": "0.0.6" to package.json of your brunch app.

If you want to use git version of plugin, add "static-phantom-renderer-brunch": "git+ssh://[email protected]:nemata/static-phantom-renderer-brunch.git".

License

static-phantom-renderer-brunch is released under the MIT License (see LICENSE for details).

static-phantom-renderer-brunch's People

Contributors

gerstnr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cremalab tudo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.