layout | title |
---|---|
default |
Installation |
Polymer Docs is a boilerplate documentation framework and theme for Github Pages which converts Markdown to Polymer library Web Component pages. This project is based on Polymer/docs and uses Jekyll and Grunt, among other libraries.
Fork https://github.com/mjames-upc/polymer-docs on Github, and then clone to your local machine:
git clone https://github.com/<username>/polymer-docs.git
gem install bundler jekyll --user-install
npm install grunt-cli vulcanize bower compass
npm install grunt --save-dev
To install these globally run
npm install -g ...
The
--user-install
flag will install the gem to your home directory (usually~/.gem/ruby/2.2.0
)
cd polymer-docs
bundle install
npm install
bower install
grunt docs
grunt
and open http://127.0.0.1:4000/polymer-docs/
Push any commits to your remote (you must have your own repo pushed to github if you didn't fork it there already).
git push origin master
grunt gh-pages
and go to https://<username>.github.io/polymer-docs/
The command grunt gh-pages
will download your remote repo to a temporary directory, checkout the gh-pages branch (or create one if it doesn't exist), copy the contents of _site
, and then push back to github (git push origin gh-pages
).
Run ./deploy.sh
and a new _site
directory is created and trimmed of fat. You can manually copy the contents of this directory to another repo gh-pages
branch and push to Github, just be certain that names defined in _config.yml
are correct.
-
Grunt automates tasks like minifying JavaScript, compiling SASS, and deploying the website with Jekyll.
-
Vulcanize (built by the Polymer team) reduces HTML files and their dependent HTML imports into one file.
-
Bower is a tool for managing JavaScript dependencies.
If Ruby warns you that the user install directory is not on your path, add it now by adding the following to your
.bashrc
file (or whatever is appropriate for your development environment):PATH="$PATH:$(ruby -rubygems -e 'puts Gem.user_dir')/bin"