- Install Polymer CLI with
npm install -g polymer-cli
- NGINX 1.9.5+ installed with http2 support with config on
/etc/nginx/site-available/shuvayatra.org
- Lets Encrypt to provide SSL. Can be install with
sudo apt-get install letsencrypt
. Then setup the certificates under domain with letsencrypt command
- Change working directory to
/var/www/webappp
where Shuvayatra web app source code deployed - Pull the repo from Github
git pull origin master
- Build the code with Polymer CLI
polymer build
. You can check how the build process works from this page - Check the build result on build directory. Based on NGINX config, we're using
build/es5-bundled
which deliver es5 compatible scripts that works on Google Bot and most browsers.
Google crawler already able to crawl single page application (SPA) that render the content on client side not on server side. But to make sure Google able to index the content, we need to do some additional requirements.
- Generate a sitemap and submit to Google Webmaster Tools. We have a script that pull all data from API and generate an sitemap.xml and sitemap.xml.gz file under https://shuvayatra.org/sitemap.xml
- Submit the sitemap to Google Webster Tool
- Make sure the code build compiled with es5 to make sure the web can be read by Google Crawler Bot. You can test the web can be read by Google Crawler Bot using this fetch as Google tool.