close
The Wayback Machine - https://web.archive.org/web/20150205170347/https://github.com/Polymer/docs
Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Documentation for Polymer
Failed to load latest commit information.
Image _data Updating metadata
Image _includes copyright 2014 to 2015
Image _layouts Updating metadata
Image _plugins Fixes #734
Image articles Merge pull request #874 from Polymer/docs-873
Image bootstrap Initial doc commit to master
Image build Removing navgroup cruft
Image css Add redirects for topeka and designer
Image doc_themes remove BOM
Image docs Update creatingelements.md
Image elements Add redirects for topeka and designer
Image font Bringing in Rafs mdv docs. New font icons
Image images incorporated feedback from Eric, Rob, and Kevin
Image js Takes the site banner's height into account when calculating the scro…
Image platform Web animation basic usage script working for current web-animations-js
Image resources Merge pull request #840 from robdodson/bower-docs
Image samples Add plunker-buttons for samples, move samples.
Image sass Preview badge fix, take 3:
Image scripts Update docs to work exclusively with bower
Image .bowerrc Update docs to work exclusively with bower
Image .gitignore docs-468: Doc computed block & inline function support.
Image CONTRIBUTING.md Update contributing. Fixes #411
Image Gemfile Manage Ruby deps (e.g. Jekyll) with Bundler[1]
Image Gemfile.lock Manage Ruby deps (e.g. Jekyll) with Bundler[1]
Image Gruntfile.js Don't exclude Polymer when vulcanizing standalone samples.
Image README.md Manage Ruby deps (e.g. Jekyll) with Bundler[1]
Image _config.yml Updated latest_version configuration to 0.5.2
Image app.yaml Add redirects for topeka and designer
Image bower.json Fix comments
Image build.py Audit license header
Image config.rb Use `/shadow-*/` and `polymer-next-selector`
Image discuss.md Removing navgroup cruft
Image humans.txt update authors
Image index.md Merge pull request #840 from robdodson/bower-docs
Image main.py Tutorial redirect
Image package.json Update docs to work exclusively with bower
Image quickstart.md Update raw refs to platform.js to webcomponents.js
Image vulcanize_config.json Update to latest vulcanize that takes excludes list

README.md

Polymer docs are mostly in Markdown with some HTML. Jekyll is used to generate the static HTML for the site. The output is generated into a folder called _site and served from Google App Engine.

Prereqs and installation requirements

We use Jekyll 2.4 and Grunt to generate the documentation, and compass to compile SASS to CSS. You'll need to install the requirements before working on the docs (these instructions assume NPM is already installed):

gem install bundler
npm install -g grunt-cli vulcanize bower

Note: If you receive permission warnings, you may need to run the above tasks with sudo.

You'll also need the Python App Engine SDK to run the dev_appserver and preview the docs locally. Download the SDK.

Getting Started

  • git clone https://github.com/Polymer/docs.git
  • bundle install
  • npm install (this will also run bower install for you)
  • grunt (or npm start)

Making edits and previewing changes

This repo (Polymer/docs) is where the documentation source files live. To make a change:

  1. Be sure to run npm install in your docs directory if it's a new checkout.
  2. Fire up the grunt task. This task runs a number of processes: a local app engine server, jekyll, compass, and vulcanize. The jekyll, compass, and vulcanize tasks will all watch for file changes and update the site if you make any edits. Note: Jekyll generates the static site in a folder named _site. It can take some time for the docs to fully regenerate and be copied to the output folder...keep refreshing!
  3. Make your edits.

Once your changes look good, git commit them and push.

Releases: pushing the docs

Note: only project owners can publish the documentation.

Preview locally

It's a good idea to run grunt before pushing the docs, as it runs a number of grunt tasks. Verify things went well and preview your changes locally using the dev server.

Release

Run bower update to make sure you have the latest component dependencies.

Once these are updated, you need to update some versions for the docs:

  • Increment the version in app.yaml;
  • Update the Polymer release version in _config.yml.
  • Add a link point link to the release notes in changelog.md.

Build the docs:

grunt docs

At this point, run the dev server with grunt, and preview things locally to make sure nothing is terribly broken after Polymer and the elements have been updated.

Next, run the deploy script in the root of the Polymer/docs directory:

./scripts/deploy_site.sh

This script builds the site, api docs, runs Vulcanizer over the imports, and deploys to App Engine.

Last thing is to switch the app version in the App Engine admin console. To make the docs live, hit up https://appengine.google.com/deployment?&app_id=s~polymer-project and select the version you just deployed.

Something went wrong with that request. Please try again.